Skip to content

Update: add Checkmarx One scan workflow for public repo testing - #2

Open
cx-shrinil-modhave wants to merge 3 commits into
mainfrom
AST-177880/cx-one-scan-test
Open

cx-shrinil-modhave wants to merge 3 commits into
mainfrom
AST-177880/cx-one-scan-test

Conversation

@cx-shrinil-modhave

@cx-shrinil-modhave cx-shrinil-modhave commented Sep 10, 2026 •

Copy link
Copy Markdown

Summary

Adds a Checkmarx One scan workflow (cx-one-scan.yaml) for this public repo, and tags both the Checkmarx One project and each scan with this repository's GitHub custom properties (repo_owner, team_name, security_champion, repo_component), so findings in Checkmarx One can be filtered/owned by team without manual tagging.

What changed

  • New workflow: cx-one-scan.yaml runs a Checkmarx One scan (SAST/SCA/IaC/API security/containers/SCS/ASCA) on pull_request, push (main/master), a daily schedule, and manual dispatch.
  • Custom property tagging: a new step calls the GitHub API (repos/{repo}/properties/values) to read this repo's custom properties, then passes them to the Checkmarx CLI as both --project-tags (persists on the Checkmarx One project) and --tags (applied per scan), using the repo's own GITHUB_TOKEN — no extra permissions needed since this is a metadata-read-only call.
  • Addressed PR review feedback:
    • actions/checkout bumped v6 → v7.0.1
    • checkmarx/ast-github-action bumped 2.3.42 → 2.3.46 (latest)
    • push trigger now also runs on master, for repos still using the legacy default branch name

Why

  • Checkmarx One scan results for this repo had no way to be automatically associated with the owning team/champion — this closes that gap by reusing metadata already maintained in GitHub (custom properties) instead of hand-maintaining tags in Checkmarx One.
  • The three reviewer suggestions (action version pins, legacy branch support) were straightforward and low-risk, so they're folded into this same change.

What this achieves

  • Every Checkmarx One scan and project for this repo is automatically tagged with repo_owner, team_name, security_champion, and repo_component, kept in sync with GitHub on every run (no manual upkeep).
  • Pinned actions are current, reducing exposure to any issues fixed in checkout 7.x and ast-github-action 2.3.43-2.3.46.
  • The workflow now also triggers correctly for repos whose default branch is master.

@cx-shrinil-modhave
cx-shrinil-modhave requested a review from a team as a code owner September 10, 2026 07:53
@stepsecurity-app

stepsecurity-app Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

✅ Resolved — a later workflow run passed this policy check.

Original alert (resolved)

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.AST_RND_SCANS_BASE_URI at line 32
  • secrets.AST_RND_SCANS_TENANT at line 33
  • secrets.AST_RND_SCANS_CLIENT_ID at line 34
  • secrets.AST_RND_SCANS_CLIENT_SECRET at line 35

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-shrinil-modhave) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@cx-jonathan-hartman cx-jonathan-hartman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor suggestions and otherwise LGTM.

Is this still in testing or is it getting ready to merge? The PR subject says "test:" so I was confused 😄

Comment thread .github/workflows/cx-one-scan.yaml Outdated
Comment thread .github/workflows/cx-one-scan.yaml
Comment thread .github/workflows/cx-one-scan.yaml Outdated
@cx-shrinil-modhave
cx-shrinil-modhave force-pushed the AST-177880/cx-one-scan-test branch from 30c77ac to 1d9e4f0 Compare October 14, 2026 07:07
@cx-shrinil-modhave cx-shrinil-modhave changed the title test: add Checkmarx One scan workflow for public repo testing Update: add Checkmarx One scan workflow for public repo testing Oct 14, 2026
- New cx-one-scan.yaml workflow runs a Checkmarx One scan (SAST/SCA/
  IaC/API security/containers/SCS/ASCA) on pull_request, push
  (main/master), a daily schedule, and manual dispatch
- Fetch the repo's GitHub custom properties (repo_owner, team_name,
  security_champion, repo_component) via the GitHub API and apply them
  as both project tags and scan tags, so Checkmarx One findings can be
  filtered/owned by team without manual tagging; gracefully skips
  tagging (with a warning annotation) instead of failing the scan if
  the properties can't be fetched or none are set
- Pin actions/checkout to v7.0.1 and checkmarx/ast-github-action to
  2.3.46
- Scope permissions at the job level (contents: read), with
  permissions: {} as the workflow-level default
@cx-shrinil-modhave
cx-shrinil-modhave force-pushed the AST-177880/cx-one-scan-test branch from 0a57ccd to 64dec5e Compare October 15, 2026 14:45
Add a workflow_call trigger (declaring the four Checkmarx secrets as
required) so other repos can invoke this workflow directly via
uses: Checkmarx/doss-github-actions-public/.github/workflows/cx-one-scan.yaml@<ref>
instead of duplicating it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants