-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): pin third-party actions to full commit SHAs #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # SPDX-License-Identifier: AGPL-3.0-or-later | ||
| # This workflow is managed by gh actions-lock. | ||
| # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> | ||
|
|
@@ -48,15 +48,17 @@ | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7.0.1 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install stable Rust toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # master | ||
| with: | ||
| toolchain: master | ||
| with: | ||
| toolchain: stable | ||
|
Comment on lines
+55
to
58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: for f in .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml; do echo "### $f"; rg -n -A10 -B3 'dtolnay/rust-toolchain' "$f"; done
git diff -- .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.ymlRepository: hyperpolymath/echidna Length of output: 5969 🏁 Script executed: set -eu
printf '%s\n' '## status and diff'
git status --short
git diff --stat
printf '%s\n' '## recent commit summary'
git log -3 --oneline -- .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml
printf '%s\n' '## current workflow sections'
for f in .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml; do
echo "### $f"
case "$f" in
.github/workflows/formal-verification.yml) sed -n '45,65p' "$f" ;;
.github/workflows/mvp-smoke.yml) sed -n '28,45p' "$f" ;;
.github/workflows/rust-native-reusable.yml) sed -n '168,190p' "$f" ;;
.github/workflows/s4-loop.yml) sed -n '33,47p' "$f" ;;
.github/workflows/server-boot-gate.yml) sed -n '25,40p' "$f" ;;
esac
done
printf '%s\n' '## available workflow validators'
command -v actionlint || true
command -v ruby || true
python3 - <<'PY'
try:
import yaml
print("PyYAML: available")
except Exception as e:
print("PyYAML: unavailable:", type(e).__name__)
PY
printf '%s\n' '## relevant repository workflow guidance'
rg -n -i --glob '!target/**' --glob '!node_modules/**' 'actionlint|duplicate.*(key|mapping)|GitHub Actions|toolchain: (stable|master)|dtolnay/rust-toolchain' .github README.md CONTRIBUTING.md 2>/dev/null || true
printf '%s\n' '## pre-change versions from parent'
for f in .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml; do
echo "### $f"
git show HEAD^:"$f" 2>/dev/null | nl -ba | sed -n '25,65p;165,195p' || echo 'parent version unavailable'
doneRepository: hyperpolymath/echidna Length of output: 17768 🤖 get_repo_knowledge executed:
Length of output: 524 🏁 Script executed: set +e
printf '%s\n' '## actionlint on cited workflows'
actionlint .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml
status=$?
printf 'actionlint_exit=%s\n' "$status"
printf '%s\n' '## parent-to-current changes at cited sites'
for f in .github/workflows/formal-verification.yml .github/workflows/mvp-smoke.yml .github/workflows/rust-native-reusable.yml .github/workflows/s4-loop.yml .github/workflows/server-boot-gate.yml; do
echo "### $f"
git diff --no-ext-diff --unified=4 HEAD^ HEAD -- "$f" | sed -n '1,120p'
done
exit 0Repository: hyperpolymath/echidna Length of output: 11669 🌐 Web query:
💡 Result: <search_synthesis> <source_evidence> Citations:
Use one All five cited steps contain duplicate The 🧰 Tools🪛 YAMLlint (1.37.1)[error] 57-57: duplication of key "with" in mapping (key-duplicates) 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Cache Rust build artefacts | ||
| uses: Swatinem/rust-cache@v2.9.2 | ||
| uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 | ||
| with: | ||
| workspaces: ". -> target" | ||
|
|
||
|
|
@@ -79,10 +81,10 @@ | |
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7.0.1 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Install nightly Rust toolchain (Creusot pin) | ||
| uses: dtolnay/rust-toolchain@master | ||
| uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de # master | ||
| with: | ||
| # Pin matches crates/echidna-core-spark/rust-toolchain.toml. | ||
| # Update both files together when bumping. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/echidna
Length of output: 4476
🏁 Script executed:
Repository: hyperpolymath/echidna
Length of output: 10905
🌐 Web query:
GitHub Actions workflow duplicate mapping key with already defined parser rejects duplicate YAML keys💡 Result:
<search_synthesis>
GitHub Actions workflows strictly reject duplicate YAML mapping keys [1][2][3]. While some general-purpose YAML parsers may silently resolve duplicate keys by keeping the last defined value (a "last-wins" behavior), the GitHub Actions runner&
#39;s schema validator treats duplicate keys as a syntax error [4][5][3]. When a workflow file contains duplicate keys, the GitHub Actions runner typically rejects the file entirely [1][4][5]. This often results in a workflow run that fails to start, appearing with zero jobs and no logs, which can be difficult to debug [4][5][3]. To prevent and identify these issues, it is recommended to: 1. Use a dedicated YAML linter or a tool like actionlint, which is specifically designed to detect duplicate keys and other workflow syntax errors before you push your code [6][1][7]. 2. Ensure that job IDs and other mapping keys are unique throughout the workflow file [1]. 3. Be aware that some key comparisons in GitHub Actions workflow syntax are case-insensitive (e.g., job IDs), meaning that 'test' and 'TEST' would be treated as duplicates [6][7].</search_synthesis>
<source_evidence>
Citations:
Remove the duplicate
withmappings from the Rust toolchain steps.GitHub Actions rejects duplicate mapping keys before the workflow jobs run. Remove the added
toolchain: masterblock and retaintoolchain: stablein:.github/workflows/cargo-audit.yml.github/workflows/chapel-ci.yml.github/workflows/live-provers.ymlThis preserves each step's pre-change toolchain behaviour.
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 54-54: duplication of key "with" in mapping
(key-duplicates)
🤖 Prompt for AI Agents