Skip to content

🐛 Include workflow path in parse errors#5076

Open
bmendonca3 wants to merge 1 commit into
ossf:mainfrom
bmendonca3:fix-workflow-parse-error-path
Open

🐛 Include workflow path in parse errors#5076
bmendonca3 wants to merge 1 commit into
ossf:mainfrom
bmendonca3:fix-workflow-parse-error-path

Conversation

@bmendonca3

Copy link
Copy Markdown

Summary

  • include the matched workflow path when file parser callbacks return errors
  • include the workflow path for GitHub Packaging parse errors, which uses its own workflow loop
  • add regression coverage for both shared file parser and Packaging paths

This helps malformed workflow YAML errors point at the offending file, addressing #5072.

For the repro repo in #5072, the malformed workflow is .github/workflows/benchmark.yml.

Testing

  • GOTOOLCHAIN=local /tmp/scorecard-go-toolchain/go/bin/go test ./checks/fileparser -run 'TestOnMatchingFileContentIncludesFilePathOnCallbackError|TestOnMatchingFileContent' -count=1
  • GOTOOLCHAIN=local /tmp/scorecard-go-toolchain/go/bin/go test ./checks/raw/github -run TestPackagingIncludesWorkflowPathOnParseError -count=1
  • GOTOOLCHAIN=local /tmp/scorecard-go-toolchain/go/bin/go test ./checks/fileparser ./checks/raw/github ./checks/raw -count=1
  • GOTOOLCHAIN=local /tmp/scorecard-go-toolchain/go/bin/go test ./checks/... -count=1
  • git diff --check

Signed-off-by: bmendonca3 <208517100+bmendonca3@users.noreply.github.com>
@bmendonca3 bmendonca3 requested a review from a team as a code owner May 29, 2026 02:07
@bmendonca3 bmendonca3 requested review from AdamKorcz and justaugustus and removed request for a team May 29, 2026 02:07
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 29, 2026

@justaugustus justaugustus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note about AI contributions —> ossf/allstar#841 (comment)

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

This pull request has been marked stale because it has been open for 10 days with no activity

@github-actions github-actions Bot added the Stale label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. Stale

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants