-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from Checkmarx/elchanan/fix_sast_and_iac_vul
GitHub Action | Fix SAST & IAC Vul + Threshold (AST-47971)
- Loading branch information
Showing
10 changed files
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
name: Checkmarx One Scan | ||
|
||
on: [ pull_request, workflow_dispatch ] | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '00 7 * * *' # Every day at 07:00 | ||
|
||
jobs: | ||
cx-scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected].0 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- name: Checkmarx One CLI Action | ||
uses: checkmarx/ast-github-action@main | ||
uses: checkmarx/ast-github-action@9fda5a4a2c297608117a5a56af424502a9192e57 # v.2.0.34 | ||
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: --tags phoenix --threshold "sast-high=1;sca-high=1;sca-medium=3;sca-low=1" --debug | ||
additional_params: --tags phoenix --threshold "sast-critical=1;sast-high=1;sast-medium=1;sast-low=1;sca-critical=1;sca-high=1;sca-medium=1;sca-low=1;iac-security-critical=1;iac-security-high=1;iac-security-medium=1;iac-security-low=1;" |
This file contains 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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/[email protected] | ||
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 #v1.6.0 | ||
with: | ||
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | ||
- name: Enable auto-merge for Dependabot PRs | ||
|
@@ -20,6 +20,6 @@ jobs: | |
GITHUB_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}} | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
- name: Auto approve dependabot PRs | ||
uses: hmarr/auto-approve-action@v3 | ||
uses: hmarr/auto-approve-action@a2e6f2a0ccf5c63ef8754de360464edbf47e66ee #v3 | ||
with: | ||
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 #v1 | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
|
@@ -31,7 +31,7 @@ jobs: | |
echo "::set-output name=body_release::$body_release" | ||
- name: Converts Markdown to HTML | ||
id: convert | ||
uses: lifepal/[email protected] | ||
uses: lifepal/markdown-to-html@253bbd85fbdeafe2d1f18c1b9289be24e5cf8f8f #v1.2 | ||
with: | ||
text: "${{ steps.release.outputs.body_release }}" | ||
|
||
|
@@ -43,7 +43,7 @@ jobs: | |
echo "::set-output name=clean::$clean" | ||
- name: Send a Notification | ||
id: notify | ||
uses: thechetantalwar/teams-notify@v2 | ||
uses: thechetantalwar/teams-notify@8a78811f5e8f58cdd204efebd79158006428c46b #v2 | ||
with: | ||
teams_webhook_url: ${{ secrets.TEAMS_WEBHOOK_URI }} | ||
message: "<h1>Checkmarx One Github Action ${{ github.ref_name }}</h1>${{ steps.clean.outputs.clean }}" |
This file contains 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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#Use AST Base image | ||
FROM checkmarx/ast-cli:2.2.5 | ||
# Use AST Base image | ||
FROM checkmarx/ast-cli:2.2.8@sha256:6bdb2d0b18246ca1a269de2860938313ea14ca2d6e443c953c84fbac9ee5df85 | ||
|
||
USER root | ||
# Copy the entrypoint script and properties used for the action | ||
COPY --chmod=500 entrypoint.sh /app/entrypoint.sh | ||
COPY --chmod=500 cleanup.sh /app/cleanup.sh | ||
|
||
#Copy the entrypoint script and properties used for the action | ||
COPY entrypoint.sh /app/entrypoint.sh | ||
COPY cleanup.sh /app/cleanup.sh | ||
|
||
RUN chmod +x /app/entrypoint.sh \ | ||
&& chmod +x /app/cleanup.sh | ||
# Docker actions must be run by the default Docker user (root). | ||
USER root |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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