Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Add secret type and context lines to secret alert #422

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

aponcedeleonch
Copy link
Contributor

Closes: #365

Until now we have only stored the redacted secret in the alert string. This PR also stores the type of secret and the surrounding lines in the alert text:

"trigger_string": "GitHub - Access Token:\nimport numpy\n\nGITHUB_TOKEN=\"ghp_1J9Z3Z2dfg4dfs23dsfsdf232aadfasdfasfasdf32\"\n\[email protected](\"/providers\", methods=[\"POST\"])\ndef add_provider():",

Until now we have only stored the redacted secret in the alert string.
This PR also stores the type of secret and the surrounding lines in the
alert text:
```
"trigger_string": "GitHub - Access Token:\nimport numpy\n\nGITHUB_TOKEN=\"ghp_1J9Z3Z2dfg4dfs23dsfsdf232aadfasdfasfasdf32\"\n\[email protected](\"/providers\", methods=[\"POST\"])\ndef add_provider():",
```
@aponcedeleonch aponcedeleonch merged commit a8f8a78 into main Dec 19, 2024
3 checks passed
@aponcedeleonch aponcedeleonch deleted the store-secrets-context branch December 19, 2024 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store metadata when alerting on secrets.
2 participants