@@ -105,6 +105,7 @@ jobs:
105
105
ls Output
106
106
107
107
- name : Generate GitHub Actions build provenance
108
+ id : gh_provenance_step # Added id
108
109
109
110
with :
110
111
subject-path : windows/Output/*.exe
@@ -159,21 +160,42 @@ jobs:
159
160
- name : Debug SLSA provenance files
160
161
run : |
161
162
Write-Host "Looking for provenance files..."
163
+ $ghProvenanceFile = "${{ steps.gh_provenance_step.outputs.bundle-path }}"
164
+ if ($ghProvenanceFile) {
165
+ Write-Host "Expected provenance file from gh_provenance_step: $ghProvenanceFile"
166
+ if (Test-Path $ghProvenanceFile) {
167
+ Write-Host "Found it at the expected path."
168
+ } else {
169
+ Write-Host "::warning::Expected provenance file from gh_provenance_step NOT FOUND at path: $ghProvenanceFile"
170
+ }
171
+ } else {
172
+ Write-Host "::warning::No bundle-path output from gh_provenance_step."
173
+ }
162
174
$files = Get-ChildItem -Path ".", "..", "../.." -Recurse -Filter "*.intoto.jsonl" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
163
- Write-Host "Found provenance files:"
175
+ Write-Host "Found provenance files via general search :"
164
176
$files | ForEach-Object { Write-Host $_ }
165
177
166
178
- name : Verify SLSA Provenance
167
179
continue-on-error : true
168
180
run : |
169
- # Find the provenance file correctly
170
- $provenance = Get-ChildItem -Path "." -Filter "*.intoto.jsonl" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
171
- if (-not $provenance) {
172
- # Try a broader search but exclude test files
173
- $provenance = Get-ChildItem -Path ".", "..", "../.." -Recurse -Filter "*.intoto.jsonl" -ErrorAction SilentlyContinue |
174
- Where-Object { $_.FullName -notlike "*\testdata\*" -and $_.FullName -notlike "*\test\*" } |
175
- Select-Object -First 1 -ExpandProperty FullName
181
+ $provenance = ""
182
+ $ghProvenanceFile = "${{ steps.gh_provenance_step.outputs.bundle-path }}"
183
+
184
+ if (-not ([string]::IsNullOrEmpty($ghProvenanceFile)) -and (Test-Path $ghProvenanceFile)) {
185
+ $provenance = $ghProvenanceFile
186
+ Write-Host "Using provenance file from 'Generate GitHub Actions build provenance' step: $provenance"
187
+ } else {
188
+ Write-Host "::warning::Provenance file from 'Generate GitHub Actions build provenance' step output not found (path: '$ghProvenanceFile'). Falling back to search..."
189
+ # Fallback: Find the provenance file using existing search logic
190
+ $provenance = Get-ChildItem -Path "." -Filter "*.intoto.jsonl" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
191
+ if (-not $provenance) {
192
+ # Try a broader search but exclude test files
193
+ $provenance = Get-ChildItem -Path ".", "..", "../.." -Recurse -Filter "*.intoto.jsonl" -ErrorAction SilentlyContinue |
194
+ Where-Object { $_.FullName -notlike "*\\\\testdata\\\\*" -and $_.FullName -notlike "*\\\\test\\\\*" } |
195
+ Select-Object -First 1 -ExpandProperty FullName
196
+ }
176
197
}
198
+
177
199
if (-not $provenance) {
178
200
Write-Host "::warning::SLSA provenance file not found, skipping verification"
179
201
exit 0 # Don't fail the build, but warn about it
0 commit comments