Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/trunk-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# The repository trunk config defines actionlint as a custom command.
# trunk-action does not install custom-command binaries, so provision
# the official binary before the check (otherwise every PR reports the
# misleading "Binary not found" failure).
- name: Install actionlint
shell: bash
run: |
set -euo pipefail
mkdir -p "$HOME/.local/bin"
bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest "$HOME/.local/bin"

Check failure on line 40 in .github/workflows/trunk-check.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Avoid executing downloaded artifacts directly without verification.

See more on https://sonarcloud.io/project/issues?id=KooshaPari_OmniRoute&issues=AZ_fi_1bGjm1flKASgBz&open=AZ_fi_1bGjm1flKASgBz&pullRequest=542

Check warning on line 40 in .github/workflows/trunk-check.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Not enforcing HTTPS here might allow for redirections to insecure websites. Make sure it is safe here.

See more on https://sonarcloud.io/project/issues?id=KooshaPari_OmniRoute&issues=AZ_fi_1bGjm1flKASgB0&open=AZ_fi_1bGjm1flKASgB0&pullRequest=542

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pin the actionlint installer

In this pull_request/push workflow, this line executes whatever is currently on the upstream rhysd/actionlint main branch and asks it to install latest, while the adjacent actions are pinned to SHAs. A transient or compromised upstream change can break CI or run arbitrary code in this job without any repository change, so fetch a fixed actionlint release and ideally verify its checksum, or pin the installer to a commit.

Useful? React with 👍 / 👎.

echo "$HOME/.local/bin" >> "$GITHUB_PATH"
"$HOME/.local/bin/actionlint" -version

- name: Trunk Check
uses: trunk-io/trunk-action@04ba50e7658c81db7356da96657e6e77f220bfa3 # embeds actions/cache@27d5ce7f (v5.0.5)

Expand Down
Loading