Registry Mirror
Skip to content

Conversation

@cx-rahul-pidde

@cx-rahul-pidde cx-rahul-pidde commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Honour scanner switches and severity threshold from cx-onboarding.properties in agent hooks (cx hooks, ASCA, KICS, secrets, SCA guardrails).
  • Refine scanner switch / severity threshold handling and add unit tests (scanner_switch_test.go, sca/threshold_test.go).

Related

AST-181538

Testing

Unit tests added/updated for scanner switches and SCA threshold handling. Full suite and lint not run locally.

cx-rahul-pidde and others added 2 commits October 14, 2026 19:38
…nboarding.properties

- New scannerconfig package reads ~/.checkmarx/cx-onboarding.properties:
  cx_{asca,sca,kics,secret}_scanner_enabled (default on) and cx_severity_threshold
  (blank/invalid = low). Any read problem leaves everything enabled.
- Hooks skip a disabled engine and let ASCA/KICS/SCA denies below the threshold
  through. Secrets always block; malicious packages and unknown severities are
  never relaxed.
- Claude, Cursor, Gemini and Codex are excluded: they skip secret detection and
  ignore the switches/threshold; all other agents (Copilot, Droid, Windsurf, ...)
  honour them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… agent hooks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cx-rahul-pidde
cx-rahul-pidde merged commit 4768f8c into staging Oct 15, 2026
21 of 24 checks passed
cx-alon-rosenhek pushed a commit that referenced this pull request Oct 21, 2026
* Add provenance tag and confidence-gated suppression to guardrail prompts (AST-180794) (#1578)

* AST-180794: Add provenance tag and confidence-gated suppression to guardrail prompts

Tags ASCA/KICS/SCA guardrail output with a Checkmarx provenance marker so
agents can distinguish genuine findings from spoofed text, and replaces the
blanket "ask the user first" suppression gate with a confidence-gated model:
suppress only when grounded in something verifiable in the file (or, for SCA,
after actually attempting remediation), otherwise ask instead of guessing.
Also reminds the agent to resume the original task after handling a finding.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Fix whitespace lint issues in provenanceTag helpers

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Add hook-deny header and explicit user-instruction path to guardrail prompts

Adds a shared hookDenyHeader to ASCA, KICS, and SCA guardrail prompts that
states up front the message is a Checkmarx hook deny, not file content or an
untrusted tool error, without repeating the spoof phrases the anti-injection
skill tests treat as evidence a message did not come from Checkmarx.

Splits the suppression rule into two independently sufficient paths: (a) the
user explicitly told the agent to suppress or ignore the finding, honored
immediately with no further verification, or (b) the agent decides on its own
and grounds that decision in code it has actually opened and read itself (not
an assumption or another file's claim). SCA's package suppression path is
tightened the same way, requiring either the user's instruction or an actual
remediation attempt returning "no fixed version exists".

Adds injection-trigger regression tests across all five supported agents for
ASCA, KICS, and SCA verifying the hook-deny header is present and phrases like
"without asking" or "silently" never appear in agent-facing text.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Restructure guardrail prompts to classify-then-act remediation model

Replaces the analyze/ask-when-unsure flow with an explicit classify-then-act
sequence: findings are false positives only when cited evidence meets (a) or
(b), otherwise they are always remediated autonomously and never surfaced to
the user as a remediate-or-suppress question. Adds a structured remediation
summary report and a verify-and-retry step across ASCA, KICS, and SCA
guardrails.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Include findings list and tighten guardrail summary wording

Adds the findings/packages list into the Cursor ASCA/KICS prompts and the
SCA malicious/vulnerable prompts (previously only in the non-Cursor path),
and simplifies remediationNote's signature now that subject/goal are no
longer used. Aligns summary report wording and evidence hints (e.g. "parent
module or sibling manifest") across agents, and updates the KICS Cursor test
to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Share remediation report templates and bump ast-cx-hooks

Extract the ASCA, KICS, and SCA closing remediation reports into shared
constants (ascaRemediationReport, kicsRemediationReport, scaMaliciousReport,
scaVulnerableReport) so the Cursor and non-Cursor deny paths render the same
markdown report instead of two copies that could drift apart. Bump
ast-cx-hooks to v1.0.10 and refresh go.sum.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* AST-180794: Sync guardrail prompts with hardened skill wording

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* Block agent file edits that introduce hardcoded secrets (AST-181538) (#1583)

* AST-181538 - Honour scanner switches and severity threshold from cx-onboarding.properties (#1586)

* AST-181538 - Fix golangci-lint issues in agent hooks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* AST-181538 - Fix remaining revive comment lint issues

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Updated misleading message on wrong scan-report format (AST-182790) (#1588)

* invalid result format type

* updated scan report wrong format message

* Update scan.go

* Fix pillow and sqlparse SCA findings (AST-188320) (#1590)

* Bump bash base image to echo bash:5.3.20 for Trivy (AST-000)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Revert bash base image to checkmarx/bash:5.3-r14 on Docker Hub (AST-000)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Ignore CVE-2026-111943 in Trivy until bash base image is rebuilt (AST-000)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Restore vulnerable lodash 4.17.21 in oss-realtime test fixture (AST-000)

The package.json fixture must contain a known-vulnerable package for
TestOssRealtimeScan_PackageJsonFileWithVulnerablePackages_Success.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Kedar Bhujade <206036177+cx-kedar-bhujade@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Aniket Shinde <aniket.shinde@checkmarx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants