Update secrets analyzer to emit leaked secret
Problem to solve
As a user, I want the secrets analyzer to emit the secret which has been leaked as part of its report.
User experience goal
Proposal
- Add
issue.RawSourceCodeExtractfield to support secrets exposing relevant tokens gitlab-org/security-products/analyzers/common!126 (merged) - Bump
security-report-schemawith new SAST field gitlab-org/security-products/security-report-schemas!52 (merged) - Remap
secretsoffenderfield toissue.raw_source_code_extractgitlab-org/security-products/analyzers/secrets!79 (merged)
Permissions and Security
No change to permissions. Part of the assumed risk with this work is potentially providing more attack surface by exposing the detected secrets within the report artifacts. This was considered not significant for a couple reasons:
- Job Artifact permissions should remain restricted as-is, assuming our standard permission model
- While not explicitly including the secret currently, the security reports are already clear evidence of RED classified data and should be assumed to contain confidential data
- The secrets are already leaked within the repository itself. This remains unchanged with this modification.
Documentation
- Update security-report-schema with new field
- Consider updating security integration docs with new field
Availability & Testing
- Update integration tests projects
- Ensure field is available to rails during parsing
What is the type of buyer?
Links / references
Edited by Lucas Charles