Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/trustabl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Trustabl
on:
push:
branches: [main]
pull_request:

permissions:
contents: read
security-events: write
pull-requests: write

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overly broad permissions. The workflow grants pull-requests: write and security-events: write, but a read-only scanner typically only needs contents: read. Consider applying the principle of least privilege and removing unnecessary write permissions. If the action does need to post findings as PR comments, document why in the PR description.


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Permissions] pull-requests: write is broader than needed for a read-only scanner. If the action only posts SARIF results, security-events: write suffices. If it posts PR comments, this is justified but worth documenting why.

jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Security: Action not pinned to commit SHA. trustabl/trustabl-action@v0 uses a mutable tag reference. GitHub Actions security best practice requires pinning third-party actions to a full commit SHA (e.g., trustabl/trustabl-action@<40-char-sha>) to prevent supply chain attacks via tag mutation. See GitHub Security Hardening.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Security] Using a floating tag trustabl/trustabl-action@v0 is a supply-chain risk — tags can be moved to point to different commits. Consider pinning to a specific commit SHA for reproducibility.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Security] Third-party action pinned to mutable tag @v0. Best practice is to pin to a full commit SHA to prevent supply-chain attacks (the tag can be force-pushed to a different commit). Consider using - uses: trustabl/trustabl-action@<commit-sha> instead. Additionally, v0 indicates pre-1.0 — breaking changes may occur without notice.

- uses: trustabl/trustabl-action@v0