Repository navigation
fix(ci): pin third-party actions to full commit SHAs #77
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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/misinformation-defence-platform
Length of output: 6814
🌐 Web query:
site:docs.github.com GitHub Actions workflow duplicate YAML mapping keys duplicate key parser error💡 Result:
<search_synthesis>
In GitHub Actions, YAML files must adhere to standard YAML syntax [1][2]. While the official GitHub Actions documentation does not explicitly detail a specific "duplicate key parser error" message, standard YAML parsers—which GitHub uses to process workflow files—typically treat duplicate keys as invalid or ambiguous [1][2]. If a GitHub Actions workflow contains duplicate mapping keys, the workflow will generally fail to parse, resulting in a validation error when you attempt to commit or run the workflow. This is because the YAML specification (which GitHub Actions follows) requires keys within a mapping to be unique. To resolve this issue: 1. Review your workflow YAML file for any keys that appear more than once at the same indentation level (e.g., defining
envorstepstwice within the same job). 2. Ensure that all job identifiers (jobs.<job_id>) are unique within thejobsobject [1][3]. 3. Use a YAML validator or linter to identify the specific line causing the duplication. Note that this behavior is distinct from some other GitHub APIs (such as the Copilot content exclusion API), which may simply overwrite earlier entries with the last occurrence of a duplicate key [4][5]; however, for GitHub Actions workflow files, strict YAML compliance is required, and duplicate keys will cause the workflow to be rejected.</search_synthesis>
<source_evidence>
Citations:
🌐 Web query:
"GitHub Actions" duplicate key with YAML workflow error💡 Result:
<search_synthesis>
A "duplicate key" error in a GitHub Actions YAML workflow occurs when a key is defined more than once within the same mapping (dictionary) [1][2]. Because GitHub Actions requires unique keys to parse the workflow configuration correctly, the presence of duplicates causes the workflow file to be rejected as invalid [1][3][4]. Common causes and solutions include: 1. Duplicate Job IDs: If you define two jobs with the same identifier (e.g., two jobs named build), the workflow will fail [1]. Ensure every job has a unique ID [1]. 2. Accidental Concatenation: Sometimes, a workflow file may accidentally contain two full workflow definitions concatenated together, resulting in duplicate top-level keys like name, on, or jobs [4]. Review the file to ensure it contains only one complete workflow structure [4]. 3. Case-Insensitivity: Note that some keys in GitHub Actions are treated as case-insensitive [5][6]. For example, defining both version_name and VERSION_NAME within the same matrix mapping will trigger a duplicate key error because the system treats them as the same key [5][6]. 4. Duplicate Triggers or Configuration: Accidentally repeating blocks (such as multiple on: pull_request sections) will cause a failure [3]. Consolidate these into a single block [4]. To prevent and debug these errors: - Use a YAML linter or specialized tools like actionlint, which can detect duplicate keys and other syntax issues before you push your code [5][1][7]. - Carefully review your YAML indentation and structure to ensure keys are not nested incorrectly or repeated [2]. - If you are using a CI/CD pipeline to validate your workflows, ensure it runs a linter that specifically checks for duplicate keys [1][3].
</search_synthesis>
<source_evidence>
Citations:
Merge the duplicate
withmappings.The
dtolnay/rust-toolchainstep defineswithtwice at the same mapping level. GitHub Actions rejects duplicate mapping keys during workflow validation; it does not silently discard one input. Keep both inputs in one mapping.Proposed fix
with: toolchain: stable - with: - components: rustfmt, clippy + components: rustfmt, clippy📝 Committable suggestion
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 28-28: duplication of key "with" in mapping
(key-duplicates)
🤖 Prompt for AI Agents