Skip to content
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

Secret Scanning Alerts migration - update to new location types #1305

Open
5 tasks done
theztefan opened this issue Nov 26, 2024 · 0 comments
Open
5 tasks done

Secret Scanning Alerts migration - update to new location types #1305

theztefan opened this issue Nov 26, 2024 · 0 comments
Labels

Comments

@theztefan
Copy link

theztefan commented Nov 26, 2024

Our Secret Scanning solution has expanded to search for secrets in other GitHub repository contents than only git history. We need to include the new location types when migration secret scanning alerts between repositories.

The /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations REST API endpoint response gives us good overview of locations that we need to consider and match on. Current location types:

"commit",
"wiki_commit",
"issue_title",
"issue_body",
"issue_comment",
"discussion_title",
"discussion_body",
"discussion_comment",
"pull_request_title",
"pull_request_body",
"pull_request_comment",
"pull_request_review",
"pull_request_review_comment"

Furthermore, when migrating Secret Scanning alerts, currently the tool only migrates the state but not the resolution_comment. Given this information might include evidence (or pointers to) for auditing purposes, we should be keeping it when migrating as well.

Todo

  • Update GitHubSecretScanningAlert model with fields related to new location types and comments
  • Update GitHubApi service to populate all new fields for new location types and comment
  • Update SecretScanningAlertService logic to match on new types (current matching criteria)
  • Review/adapt/add tests
  • Update RELEASENOTES.md

Dependencies

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant