Skip to content

Commit 0027752

Browse files
authored
Merge pull request #72 from hyphae/axmsoftware-patch-4-1
Modify scorecard workflow for SARIF retention and version
2 parents 626d656 + 6dedf5b commit 0027752

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/scorecard.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
analysis:
2323
name: Scorecard analysis
2424
runs-on: ubuntu-latest
25+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
26+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
2527
permissions:
2628
# Needed to upload the results to code-scanning dashboard.
2729
security-events: write
@@ -57,17 +59,21 @@ jobs:
5759
# of the value entered here.
5860
publish_results: true
5961

62+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
63+
# file_mode: git
64+
6065
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6166
# format to the repository Actions tab.
6267
- name: "Upload artifact"
6368
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
69+
with:
6470
name: SARIF file
6571
path: results.sarif
66-
retention-days: 10
72+
retention-days: 5
6773

6874
# Upload the results to GitHub's code scanning dashboard (optional).
6975
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7076
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@v3
77+
uses: github/codeql-action/upload-sarif@v4
7278
with:
7379
sarif_file: results.sarif

0 commit comments

Comments
 (0)