Repository navigation
Update: add Checkmarx One scan workflow for public repo testing #2
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
Open
cx-shrinil-modhave
wants to merge
5
commits into
main
Choose a base branch
from
AST-177880/cx-one-scan-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
64dec5e
Add Checkmarx One scan workflow with repo custom property tagging
cx-shrinil-modhave bf1f698
Make cx-one-scan workflow callable as a reusable workflow
cx-shrinil-modhave 00004fe
Add comment testing ruleset policy
cx-shrinil-modhave ef765fd
Dummy commit to re-trigger ruleset/workflow checks
cx-shrinil-modhave b574f20
Dummy commit to re-trigger ruleset/workflow checks
cx-shrinil-modhave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Checkmarx One Scan | ||
|
|
||
| # Testing the ruleset policy | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| schedule: | ||
| - cron: '00 7 * * *' # Every day at 07:00 | ||
| workflow_call: | ||
| secrets: | ||
| AST_RND_SCANS_BASE_URI: | ||
| required: true | ||
| AST_RND_SCANS_TENANT: | ||
| required: true | ||
| AST_RND_SCANS_CLIENT_ID: | ||
| required: true | ||
| AST_RND_SCANS_CLIENT_SECRET: | ||
| required: true | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| cx-scan: | ||
| name: Checkmarx One Scan | ||
| runs-on: cx-public-ubuntu-x64 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Get repository custom properties | ||
| id: repo-properties | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| REPO: ${{ github.repository }} | ||
| run: | | ||
| set -uo pipefail | ||
| tags=$(gh api "repos/${REPO}/properties/values" \ | ||
| --jq '[.[] | select(.value != null and .property_name != "single-owner-repo") | "\(.property_name):\(.value)"] | join(",")') || tags="" | ||
| if [ -n "${tags}" ]; then | ||
| echo "tag_args=--project-tags \"${tags}\" --tags \"${tags}\"" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "::warning::No repository custom properties found (or failed to fetch them); scan will run without custom property tags." | ||
| echo "tag_args=" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Checkmarx One CLI Action | ||
| uses: checkmarx/ast-github-action@7006afa846f6d23e3e9d351a001b9d8e59c3fb8c # 2.3.46 | ||
| with: | ||
| base_uri: ${{ secrets.AST_RND_SCANS_BASE_URI }} | ||
| cx_tenant: ${{ secrets.AST_RND_SCANS_TENANT }} | ||
| cx_client_id: ${{ secrets.AST_RND_SCANS_CLIENT_ID }} | ||
| cx_client_secret: ${{ secrets.AST_RND_SCANS_CLIENT_SECRET }} | ||
| additional_params: >- | ||
| --scan-timeout 60 | ||
| --scan-types sast,sca,iac-security,api-security,containers,scs,aisc | ||
| --scs-engines secret-detection | ||
| ${{ steps.repo-properties.outputs.tag_args }} | ||
| --threshold "sca-critical=1;sca-high=1;sca-medium=1;sca-low=1;sast-critical=1;sast-high=1;sast-medium=1;sast-low=1;iac-security-critical=1;iac-security-high=1;iac-security-medium=1;iac-security-low=1;api-security-critical=1;api-security-high=1;api-security-medium=1;api-security-low=1;containers-critical=1;containers-high=1;containers-medium=1;containers-low=1;sscs-secret-detection-critical=1;sscs-secret-detection-high=1;sscs-secret-detection-medium=1;sscs-secret-detection-low=1" | ||
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.
Uh oh!
There was an error while loading. Please reload this page.