File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 21
21
analysis :
22
22
name : Scorecard analysis
23
23
runs-on : ubuntu-latest
24
+ # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
25
+ if : github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
24
26
permissions :
25
27
# Needed to upload the results to code-scanning dashboard.
26
28
security-events : write
@@ -32,12 +34,12 @@ jobs:
32
34
33
35
steps :
34
36
- name : " Checkout code"
35
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
37
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36
38
with :
37
39
persist-credentials : false
38
40
39
41
- name : " Run analysis"
40
- uses : ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3 .1
42
+ uses : ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4 .1
41
43
with :
42
44
results_file : results.sarif
43
45
results_format : sarif
@@ -56,10 +58,13 @@ jobs:
56
58
# of the value entered here.
57
59
publish_results : true
58
60
61
+ # (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
62
+ # file_mode: git
63
+
59
64
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60
65
# format to the repository Actions tab.
61
66
- name : " Upload artifact"
62
- uses : actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
67
+ uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
63
68
with :
64
69
name : SARIF file
65
70
path : results.sarif
You can’t perform that action at this time.
0 commit comments