-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allowing trufflehog mapper to handle duplicate findings and ndjson fo…
…rmat (#6626) * allowing trufflehog mapper to handle duplicate findings and ndjson format Signed-off-by: Will <[email protected]> * lint Signed-off-by: Will <[email protected]> * fixing fingerprints to handle ndjson Signed-off-by: Will <[email protected]> --------- Signed-off-by: Will <[email protected]> Co-authored-by: Amndeep Singh Mann <[email protected]>
- Loading branch information
Showing
5 changed files
with
149 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
libs/hdf-converters/sample_jsons/trufflehog_mapper/sample_input_report/trufflehog_dup.ndjson
This file contains 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,6 @@ | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":".git/config","line":13}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":17,"DetectorName":"URI","DetectorDescription":"This detector identifies URLs with embedded credentials, which can be used to access web resources without explicit user interaction.","DecoderName":"PLAIN","Verified":false,"VerificationError":"dialing local IP addresses is not allowed","VerificationFromCache":false,"Raw":"https://gitlab-ci-token:<token>>@gitlab.my_domain.dev","RawV2":"https://gitlab-ci-token:<token>@gitlab.my_domain.dev/foo/bar.git","Redacted":"https://gitlab-ci-token:********@gitlab.my_domain.dev","ExtraData":null,"StructuredData":null} | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":"github.com/jackc/pgx/v5/pgxpool/pool.go","line":297}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":968,"DetectorName":"Postgres","DetectorDescription":"Postgres connection string containing credentials","DecoderName":"PLAIN","Verified":false,"VerificationError":"lookup pg.example.com on 10.96.0.10:53: server misbehaving","VerificationFromCache":false,"Raw":"postgres://jack:[email protected]:5432","RawV2":"postgres://jack:[email protected]:5432","Redacted":"","ExtraData":{"sslmode":"verify-ca"},"StructuredData":null} | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":"github.com/jackc/pgx/v5/pgconn/config.go","line":1}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":968,"DetectorName":"Postgres","DetectorDescription":"Postgres connection string containing credentials","DecoderName":"PLAIN","Verified":false,"VerificationError":"lookup foo.example.com:5432,bar.example.com:5432: no such host","VerificationFromCache":false,"Raw":"postgres://jack:[email protected]:5432,bar.example.com:5432:5432","RawV2":"postgres://jack:[email protected]:5432,bar.example.com:5432:5432","Redacted":"","ExtraData":{"sslmode":"\u003cunset\u003e"},"StructuredData":null} | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":"github.com/jackc/pgx/v5/pgconn/config.go","line":171}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":968,"DetectorName":"Postgres","DetectorDescription":"Postgres connection string containing credentials","DecoderName":"PLAIN","Verified":false,"VerificationError":"lookup pg.example.com on 10.96.0.10:53: server misbehaving","VerificationFromCache":false,"Raw":"postgres://jack:[email protected]:5432","RawV2":"postgres://jack:[email protected]:5432","Redacted":"","ExtraData":{"sslmode":"verify-ca"},"StructuredData":null} | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":"github.com/pressly/goose/v3/README.md","line":93}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":968,"DetectorName":"Postgres","DetectorDescription":"Postgres connection string containing credentials","DecoderName":"PLAIN","Verified":false,"VerificationError":"lookup qwerty.us-east-1.redshift.amazonaws.com on 10.96.0.10:53: server misbehaving","VerificationFromCache":false,"Raw":"postgres://user:[email protected]:5439","RawV2":"postgres://user:[email protected]:5439","Redacted":"","ExtraData":{"sslmode":"\u003cunset\u003e"},"StructuredData":null} | ||
{"SourceMetadata":{"Data":{"Filesystem":{"file":"github.com/pressly/goose/v3/README.md","line":93}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":968,"DetectorName":"Postgres","DetectorDescription":"Postgres connection string containing credentials","DecoderName":"PLAIN","Verified":false,"VerificationError":"lookup qwerty.us-east-1.redshift.amazonaws.com on 10.96.0.10:53: server misbehaving","VerificationFromCache":false,"Raw":"postgres://user:[email protected]:5439","RawV2":"postgres://user:[email protected]:5439","Redacted":"","ExtraData":{"sslmode":"\u003cunset\u003e"},"StructuredData":null} |
94 changes: 94 additions & 0 deletions
94
libs/hdf-converters/sample_jsons/trufflehog_mapper/trufflehog-ndjson-dup-hdf.json
This file contains 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,94 @@ | ||
{ | ||
"platform": { | ||
"name": "Heimdall Tools", | ||
"release": "2.11.2" | ||
}, | ||
"version": "2.11.2", | ||
"statistics": {}, | ||
"profiles": [ | ||
{ | ||
"name": "Source ID: 1, Source Name: trufflehog - filesystem", | ||
"title": "trufflehog - filesystem", | ||
"supports": [], | ||
"attributes": [], | ||
"groups": [], | ||
"status": "loaded", | ||
"controls": [ | ||
{ | ||
"tags": { | ||
"nist": [ | ||
"IA-5(7)" | ||
], | ||
"cci": [ | ||
"CCI-004069", | ||
"CCI-000202", | ||
"CCI-000203", | ||
"CCI-002367" | ||
], | ||
"severity": "medium" | ||
}, | ||
"refs": [], | ||
"source_location": {}, | ||
"title": "Found URI secret using PLAIN decoder", | ||
"id": "URI PLAIN", | ||
"impact": 0.5, | ||
"results": [ | ||
{ | ||
"status": "failed", | ||
"code_desc": "{\n \"Data\": {\n \"Filesystem\": {\n \"file\": \".git/config\",\n \"line\": 13\n }\n }\n}", | ||
"message": "{\n \"Verified\": false,\n \"VerificationError\": \"dialing local IP addresses is not allowed\",\n \"Raw\": \"https://gitlab-ci-token:<token>>@gitlab.my_domain.dev\",\n \"RawV2\": \"https://gitlab-ci-token:<token>@gitlab.my_domain.dev/foo/bar.git\",\n \"Redacted\": \"https://gitlab-ci-token:********@gitlab.my_domain.dev\"\n}", | ||
"start_time": "" | ||
} | ||
] | ||
}, | ||
{ | ||
"tags": { | ||
"nist": [ | ||
"IA-5(7)" | ||
], | ||
"cci": [ | ||
"CCI-004069", | ||
"CCI-000202", | ||
"CCI-000203", | ||
"CCI-002367" | ||
], | ||
"severity": "medium" | ||
}, | ||
"refs": [], | ||
"source_location": {}, | ||
"title": "Found Postgres secret using PLAIN decoder", | ||
"id": "Postgres PLAIN", | ||
"impact": 0.5, | ||
"results": [ | ||
{ | ||
"status": "failed", | ||
"code_desc": "{\n \"Data\": {\n \"Filesystem\": {\n \"file\": \"github.com/jackc/pgx/v5/pgxpool/pool.go\",\n \"line\": 297\n }\n }\n}", | ||
"message": "{\n \"Verified\": false,\n \"VerificationError\": \"lookup pg.example.com on 10.96.0.10:53: server misbehaving\",\n \"Raw\": \"postgres://jack:[email protected]:5432\",\n \"RawV2\": \"postgres://jack:[email protected]:5432\",\n \"ExtraData\": {\n \"sslmode\": \"verify-ca\"\n }\n}", | ||
"start_time": "" | ||
}, | ||
{ | ||
"status": "failed", | ||
"code_desc": "{\n \"Data\": {\n \"Filesystem\": {\n \"file\": \"github.com/jackc/pgx/v5/pgconn/config.go\",\n \"line\": 1\n }\n }\n}", | ||
"message": "{\n \"Verified\": false,\n \"VerificationError\": \"lookup foo.example.com:5432,bar.example.com:5432: no such host\",\n \"Raw\": \"postgres://jack:[email protected]:5432,bar.example.com:5432:5432\",\n \"RawV2\": \"postgres://jack:[email protected]:5432,bar.example.com:5432:5432\",\n \"ExtraData\": {\n \"sslmode\": \"<unset>\"\n }\n}", | ||
"start_time": "" | ||
}, | ||
{ | ||
"status": "failed", | ||
"code_desc": "{\n \"Data\": {\n \"Filesystem\": {\n \"file\": \"github.com/jackc/pgx/v5/pgconn/config.go\",\n \"line\": 171\n }\n }\n}", | ||
"message": "{\n \"Verified\": false,\n \"VerificationError\": \"lookup pg.example.com on 10.96.0.10:53: server misbehaving\",\n \"Raw\": \"postgres://jack:[email protected]:5432\",\n \"RawV2\": \"postgres://jack:[email protected]:5432\",\n \"ExtraData\": {\n \"sslmode\": \"verify-ca\"\n }\n}", | ||
"start_time": "" | ||
}, | ||
{ | ||
"status": "failed", | ||
"code_desc": "{\n \"Data\": {\n \"Filesystem\": {\n \"file\": \"github.com/pressly/goose/v3/README.md\",\n \"line\": 93\n }\n }\n}", | ||
"message": "{\n \"Verified\": false,\n \"VerificationError\": \"lookup qwerty.us-east-1.redshift.amazonaws.com on 10.96.0.10:53: server misbehaving\",\n \"Raw\": \"postgres://user:[email protected]:5439\",\n \"RawV2\": \"postgres://user:[email protected]:5439\",\n \"ExtraData\": {\n \"sslmode\": \"<unset>\"\n }\n}", | ||
"start_time": "" | ||
} | ||
] | ||
} | ||
], | ||
"sha256": "ba8c9ae68b0c4d07e06e0821811f716812ea379467c1d57d3117741d471bd0af" | ||
} | ||
], | ||
"passthrough": {} | ||
} |
This file contains 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 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 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