-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Added metadata extraction for UUID strings. #2322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+178
−9
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5d033ef
Added metadata extraction for UUID strings. This includes expanding o…
ko80240 a0c182c
Merge branch 'gchq:master' into feature/analyseUUID
ko80240 cb08db2
Remove accidentally committed file
ko80240 4a12507
Merge branch 'master' into feature/analyseUUID
ko80240 441bc91
Merge branch 'master' into feature/analyseUUID
GCHQDeveloper581 0efcd70
Restored original author, and added new author underneath
ko80240 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /** | ||
| * Analyse UUID tests | ||
| * | ||
| * @author ko80240 [csk.dev@proton.me] | ||
| * @copyright Crown Copyright 2023 | ||
| * @license Apache-2.0 | ||
| */ | ||
| import TestRegister from "../../lib/TestRegister.mjs"; | ||
|
|
||
| TestRegister.addTests([ | ||
| { | ||
| "name": "Analyse UUID: v1 UUID extracts timestamp, clock, and node", | ||
| "input": "cefa1760-28ee-11f1-9f95-1fb76af3e239", | ||
| "expectedOutput": "Version:\n1\n\nTimestamp:\n1774514156502\n\nTimestamp (ISO):\n2026-03-26T08:35:56.502Z\n\nNode:\n1F:B7:6A:F3:E2:39\n\nClock:\n8085\n\nUUID Integer:\n275119515460318071558429785403790975545", | ||
| "recipeConfig": [ | ||
| { | ||
| "op": "Analyse UUID", | ||
| "args": [true] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Analyse UUID: v7 UUID extracts timestamp, randA, and randB", | ||
| "input": "019d294a-af64-7728-9524-26da08f50708", | ||
| "expectedOutput": "Version:\n7\n\nTimestamp:\n1774514253668\n\nTimestamp (ISO):\n2026-03-26T08:37:33.668Z\n\nRand A:\n1832\n\nRand B:\n952426DA08F50708\n\nUUID Integer:\n2145256098533991595556290452700595976", | ||
| "recipeConfig": [ | ||
| { | ||
| "op": "Analyse UUID", | ||
| "args": [true] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Analyse UUID: v4 UUID should show no metadata - not possible", | ||
| "input": "f47ac10b-58cc-4372-a567-0e02b2c3d479", | ||
| "expectedOutput": "Version:\n4\n\nNo metadata available. Only versions 1, 6, 7 are supported.\n\nUUID Integer:\n324969006592305634633390616021200786553", | ||
| "recipeConfig": [ | ||
| { | ||
| "op": "Analyse UUID", | ||
| "args": [true] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Analyse UUID: if the 'Include Metadata' option is false it should return not metadata", | ||
| "input": "cefa1760-28ee-11f1-9f95-1fb76af3e239", | ||
| "expectedOutput": "Version:\n1\n\nUUID Integer:\n275119515460318071558429785403790975545", | ||
| "recipeConfig": [ | ||
| { | ||
| "op": "Analyse UUID", | ||
| "args": [false] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Analyse UUID: invalid UUID should return error message", | ||
| "input": "not-a-uuid", | ||
| "expectedOutput": "Invalid UUID", | ||
| "recipeConfig": [ | ||
| { | ||
| "op": "Analyse UUID", | ||
| "args": [true] | ||
| } | ||
| ] | ||
| } | ||
| ]); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.