@@ -32,104 +32,14 @@ jobs:
3232 uses : gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
3333 env :
3434 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- <<<<<<< HEAD
36- <<<<<<< HEAD
37- <<<<<<< HEAD
38- <<<<<<< HEAD
39- =======
40- >>>>>>> 3712a2e (ci: update workflows to remove private repository condition for security scans)
41- =======
42- >>>>>>> 41d52d6 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
4335 # GITLEAKS_CONFIG points to your custom rules file at repo root.
4436 GITLEAKS_CONFIG : .gitleaks.toml
45- <<<<<<< HEAD
46- <<<<<<< HEAD
47- # FIX: gitleaks-action v2 auto-generates a SARIF file internally and
48- # handles its own artifact upload when GITLEAKS_ENABLE_UPLOAD_ARTIFACT=true
49- # (the default). The `with.args` parameter does not exist in this action
50- # and was silently ignored — that is why results.sarif was never written
51- # to disk, causing the upload step to fail with "file not found".
52- # Uploading SARIF to the code-scanning API also requires GitHub Advanced
53- # Security (GHAS), which is not available on private free-plan repos.
54- # We therefore disable the built-in artifact upload and instead capture
55- # the report ourselves below using actions/upload-artifact (no GHAS needed).
56- GITLEAKS_ENABLE_UPLOAD_ARTIFACT : false
57- =======
58- with :
59- args : detect --source=. --report-format sarif --report-path results.sarif
60- >>>>>>> aef5768 (ci: update security workflows to check for private repository status)
61-
62- - name : Upload Gitleaks report as workflow artifact
63- # Run even when gitleaks finds secrets (exit code 1) so the report is
64- # always available for review — but skip when the step was cancelled.
65- if : always() && steps.gitleaks.outcome != 'cancelled'
66- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
67- with :
68- name : gitleaks-report
69- # gitleaks-action v2 writes the SARIF to this fixed path
70- path : results.sarif
71- if-no-files-found : ignore
72- =======
73- # Fix: In gitleaks-action v2, report format/path are controlled via
74- # GITLEAKS_REPORT_FORMAT and GITLEAKS_REPORT_PATH env vars, NOT via
75- # the `with.args` parameter (which is ignored by this action version).
37+ # FIX: In gitleaks-action v2, report format/path are controlled by env vars.
38+ # The action does not support `with.args` in this pinned version.
7639 GITLEAKS_REPORT_FORMAT : sarif
7740 GITLEAKS_REPORT_PATH : results.sarif
78- <<<<<<< HEAD
79- <<<<<<< HEAD
80- =======
81- # GITLEAKS_CONFIG points to your custom rules file at repo root.
82- >>>>>>> a7cca78 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
83- GITLEAKS_CONFIG : .gitleaks.toml
84- =======
85- >>>>>>> 09e91ff (ci: update security workflows to check for private repository status)
86- # FIX: gitleaks-action v2 auto-generates a SARIF file internally and
87- # handles its own artifact upload when GITLEAKS_ENABLE_UPLOAD_ARTIFACT=true
88- # (the default). The `with.args` parameter does not exist in this action
89- # and was silently ignored — that is why results.sarif was never written
90- # to disk, causing the upload step to fail with "file not found".
91- # Uploading SARIF to the code-scanning API also requires GitHub Advanced
92- # Security (GHAS), which is not available on private free-plan repos.
93- # We therefore disable the built-in artifact upload and instead capture
94- # the report ourselves below using actions/upload-artifact (no GHAS needed).
95- GITLEAKS_ENABLE_UPLOAD_ARTIFACT : false
96- =======
97- with :
98- args : detect --source=. --report-format sarif --report-path results.sarif
99- >>>>>>> aef5768 (ci: update security workflows to check for private repository status)
100-
101- - name : Upload Gitleaks report as workflow artifact
102- # Run even when gitleaks finds secrets (exit code 1) so the report is
103- # always available for review — but skip when the step was cancelled.
104- if : always() && steps.gitleaks.outcome != 'cancelled'
105- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
106- with :
107- <<<<<<< HEAD
108- sarif_file : results.sarif
109- continue-on-error : true
110- >>>>>>> e20a634 (ci: update workflows to remove private repository condition for security scans)
111- =======
112- name : gitleaks-report
113- # gitleaks-action v2 writes the SARIF to this fixed path
114- path : results.sarif
115- if-no-files-found : ignore
116- >>>>>>> a7cca78 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
117- =======
118- =======
119- =======
120- # GITLEAKS_CONFIG points to your custom rules file at repo root.
121- >>>>>>> a7cca78 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
122- >>>>>>> 41d52d6 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
123- GITLEAKS_CONFIG : .gitleaks.toml
124- # FIX: gitleaks-action v2 auto-generates a SARIF file internally and
125- # handles its own artifact upload when GITLEAKS_ENABLE_UPLOAD_ARTIFACT=true
126- # (the default). The `with.args` parameter does not exist in this action
127- # and was silently ignored — that is why results.sarif was never written
128- # to disk, causing the upload step to fail with "file not found".
129- # Uploading SARIF to the code-scanning API also requires GitHub Advanced
130- # Security (GHAS), which is not available on private free-plan repos.
131- # We therefore disable the built-in artifact upload and instead capture
132- # the report ourselves below using actions/upload-artifact (no GHAS needed).
41+ # FIX: Disable built-in artifact upload and upload explicitly below.
42+ # This avoids dependency on code-scanning integrations in private repos.
13343 GITLEAKS_ENABLE_UPLOAD_ARTIFACT : false
13444
13545 - name : Upload Gitleaks report as workflow artifact
@@ -138,17 +48,6 @@ jobs:
13848 if : always() && steps.gitleaks.outcome != 'cancelled'
13949 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
14050 with :
141- <<<<<<< HEAD
142- sarif_file : results.sarif
143- continue-on-error : true
144- >>>>>>> e20a634 (ci: update workflows to remove private repository condition for security scans)
145- <<<<<<< HEAD
146- >>>>>>> 3712a2e (ci: update workflows to remove private repository condition for security scans)
147- =======
148- =======
14951 name : gitleaks-report
150- # gitleaks-action v2 writes the SARIF to this fixed path
15152 path : results.sarif
152- if-no-files-found : ignore
153- >>>>>>> a7cca78 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
154- >>>>>>> 41d52d6 (ci: update CodeQL and Gitleaks workflows to improve handling of private repositories and artifact uploads)
53+ if-no-files-found : ignore
0 commit comments