Repository navigation
AST-181538: Block agent file edits that introduce hardcoded secrets - #1583
Open
cx-rahul-pidde wants to merge 3 commits into
Open
cx-rahul-pidde wants to merge 3 commits into
cx-rahul-pidde wants to merge 3 commits into
Conversation
Scan proposed file content on the write path and deny the edit with remediation, ignore, and false-positive guidance when a new secret is found. Co-authored-by: Cursor <cursoragent@cursor.com>
Use the classify-then-act remediation flow and provenance tag on secret write denials, and pick up ast-cx-hooks v1.0.10. Co-authored-by: Cursor <cursoragent@cursor.com>
An unmatched or repeated Before string was skipped, so the replacement was never scanned. Fail closed instead of guessing the file content.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
By submitting this pull request, you agree to the terms within the Checkmarx Code of Conduct. Please review the contributing guidelines for guidance on creating high-quality pull requests.
Description
Blocks an agent file edit when the proposed content introduces a hardcoded secret, for Claude, Cursor, Copilot, Codex, and Gemini. The deny uses the same classify-then-act remediation flow as the other guardrails: a Checkmarx provenance tag, hook-deny header, remediation or ignore only when the user asked or the match is a cited placeholder, a
cx scan secrets-realtimere-scan, and a remediation summary. The secret value stays out of the verdict and is passed to ignore through a temp file.Also bumps
ast-cx-hooksto v1.0.10.Type of Change
Related Issues
Checklist
Screenshots (if applicable)
Additional Notes
Detection, remediation telemetry, and the session tally use engine
Secrets. Noast-cx-hookssource change is required beyond the v1.0.10 module bump.