Skip to content

Conversation

@williambrady
Copy link
Owner

Summary

Fix artifact upload failing with "No files were found" error.

Problem

Docker container runs as root, creating report files owned by root:root. When the GitHub runner user tries to upload artifacts, it cannot read the files due to permission restrictions.

Solution

Add chmod commands after report generation to:

  • Set directory permissions to 755 (readable by all)
  • Set file permissions to 644 (readable by all)

This allows the GitHub Actions artifact upload step to access the reports.

Test plan

  • Run SAST workflow and verify artifact upload succeeds
  • Verify reports are accessible in uploaded artifacts

Docker container runs as root, creating reports owned by root.
GitHub runner user needs read access for artifact upload step.
Add chmod to make reports readable after generation.
@augmentcode
Copy link

augmentcode bot commented Jan 12, 2026

🤖 Augment PR Summary

Summary: Fixes GitHub Actions artifact upload failures caused by report outputs being created as unreadable root:root files in the container.

Changes: Adds a post-scan permission adjustment on $REPORT_DIR so the runner can read/upload generated reports.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link
Collaborator

@ghaworkflow ghaworkflow left a comment

Choose a reason for hiding this comment

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

Looks correct and tested correctly.

@williambrady williambrady merged commit de5d53f into main Jan 12, 2026
5 checks passed
@williambrady williambrady deleted the fix/report-directory-permissions branch January 12, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants