-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): Update GitHub Actions #51
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ | |
| # Supplemental PR Checks (Changelog, Link Validation) | ||
| # ========================================================================== | ||
| supplemental-checks: | ||
| uses: ByronWilliamsCPA/.github/.github/workflows/python-supplemental-checks.yml@987d517d3c8e4b180f4dd15de6d9575f0df91182 # main | ||
| uses: ByronWilliamsCPA/.github/.github/workflows/python-supplemental-checks.yml@7d12f5486ab5c856397ebaa4acd3c99ca385227c # main | ||
|
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Pass only the secrets required by the reusable workflow.
As per path instructions, workflows must use proper secret handling and minimal permissions. 🧰 Tools🪛 zizmor (1.26.1)[warning] 32-32: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow (secrets-inherit) 🤖 Prompt for AI AgentsSources: Path instructions, Linters/SAST tools |
||
| with: | ||
| # Changelog enforcement | ||
| enable-changelog-check: true | ||
|
|
@@ -56,15 +56,15 @@ | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden the runner | ||
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | ||
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
|
|
||
| - name: Install UV | ||
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | ||
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
|
|
@@ -72,12 +72,12 @@ | |
| run: uv python install 3.12 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --all-extras | ||
|
Check warning on line 75 in .github/workflows/pr-validation.yml
|
||
|
|
||
| - name: Run vulture | ||
| run: | | ||
| echo "## Dead Code Report" >> $GITHUB_STEP_SUMMARY | ||
| uv run vulture src/ packages/ --min-confidence 90 | tee vulture-report.txt || true | ||
|
Check warning on line 80 in .github/workflows/pr-validation.yml
|
||
| if [ -s vulture-report.txt ]; then | ||
| echo '```' >> $GITHUB_STEP_SUMMARY | ||
| cat vulture-report.txt >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,17 +46,17 @@ | |
| contents: read | ||
| steps: | ||
| - name: Harden the runner | ||
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | ||
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| with: | ||
| fetch-depth: 0 | ||
|
Comment on lines
53
to
56
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Disable checkout credential persistence in read-only jobs. These checkout steps do not need Git authentication after checkout. Add
As per path instructions, workflows must use proper secret handling and minimal permissions. 🧰 Tools🪛 zizmor (1.28.0)[warning] 53-56: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 📍 Affects 3 files
🤖 Prompt for AI AgentsSources: Path instructions, Linters/SAST tools |
||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | ||
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
|
|
@@ -64,10 +64,10 @@ | |
| run: uv python install 3.12 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --all-extras | ||
|
Check warning on line 67 in .github/workflows/release.yml
|
||
|
|
||
| - name: Run tests | ||
| run: uv run pytest -v --cov=src --cov-report=xml --cov-fail-under=80 | ||
|
Check warning on line 70 in .github/workflows/release.yml
|
||
|
|
||
| release: | ||
| name: Semantic Release | ||
|
|
@@ -79,18 +79,18 @@ | |
| pull-requests: write | ||
| steps: | ||
| - name: Harden the runner | ||
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | ||
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | ||
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
|
|
@@ -98,11 +98,11 @@ | |
| run: uv python install 3.12 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --all-extras | ||
|
Check warning on line 101 in .github/workflows/release.yml
|
||
|
|
||
| - name: Python Semantic Release | ||
| id: release | ||
| uses: python-semantic-release/python-semantic-release@350c48fcb3ffcdfd2e0a235206bc2ecea6b69df0 # v10.5.3 | ||
| uses: python-semantic-release/python-semantic-release@39dd2052f2ce8282a5d932c31d58a2ca06d2550e # v10.6.1 | ||
| with: | ||
| github_token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
|
|
||
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: ByronWilliamsCPA/python-libs
Length of output: 229
🏁 Script executed:
Repository: ByronWilliamsCPA/python-libs
Length of output: 5361
🌐 Web query:
GitHub Actions reusable workflows secrets inherit inherited secrets passed to child workflow💡 Result:
In GitHub Actions, the
secrets: inheritkeyword is a convenient way to pass all secrets available to the calling workflow to a reusable workflow [1][2]. When you usesecrets: inheritin a job that calls a reusable workflow, all repository, organization, and environment secrets accessible to the calling workflow are automatically made available to the reusable workflow [1][3]. Key behaviors and requirements regardingsecrets: inheritinclude: Scope: The inherited secrets are available to the directly called reusable workflow [1][4]. If your workflow execution involves a chain of calls (e.g., Workflow A calls Workflow B, which calls Workflow C), secrets are only passed to the directly called workflow [1][3]. For Workflow C to receive secrets, they must be explicitly passed or inherited from Workflow B [3]. Definition: When usingsecrets: inherit, you are not required to explicitly define the secrets in theonsection of the reusable workflow to use them [1][4]. However, defining them remains a best practice for clarity and documentation [1]. Security and Usage: Becausesecrets: inheritshares all accessible secrets, it is generally recommended for use with trusted workflows within the same organization or enterprise [1][4]. For third-party or untrusted reusable workflows, it is safer to pass only the specific secrets required by the workflow individually [5]. Example configuration in the caller workflow: jobs: call-reusable-workflow: uses: octo-org/example-repo/.github/workflows/reusable-workflow.yml@main secrets: inheritCitations:
🌐 Web query:
ByronWilliamsCPA .github python-mutation.yml line 1-200💡 Result:
The file python-mutation.yml mentioned in the ByronWilliamsCPA GitHub organization is a reusable GitHub Actions workflow used for mutation testing [1]. It is designed to validate the effectiveness of a project's test suite by introducing code mutations (using mutmut) and checking if the tests detect them [1][2]. Projects within the ByronWilliamsCPA organization (such as fragrance-rater) typically invoke this workflow as an org-level reusable workflow [2][3]. The workflow is generally called with parameters like python-version, source-directory, test-directory, and mutation-threshold [2]. Because this file exists within the.github repository as a template for other projects to call, it does not typically contain project-specific logic in its first 200 lines, but rather defines the reusable CI structure [1][2]. To view the specific contents of the file, you can access the ByronWilliamsCPA/.github repository directly at https://github.com/ByronWilliamsCPA/.github [1].
Citations:
🌐 Web query:
ByronWilliamsCPA .github python-mutation.yml secrets inherit mutated_code_mutations github_token💡 Result:
The reference to
python-mutation.ymlwithin theByronWilliamsCPA/.githuborganization repository refers to a centralized, reusable GitHub Actions workflow designed for mutation testing, typically using themutmutlibrary [1][2][3]. In various caller workflows (such as those found inByronWilliamsCPA/fragrance-rater), this reusable workflow is invoked as follows [2][3][4]: uses: ByronWilliamsCPA/.github/.github/workflows/python-mutation.yml@<version_sha> secrets: inherit The inclusion ofsecrets: inheritallows the caller workflow to pass all of its available secrets to the reusablepython-mutation.ymlworkflow [5]. Security Context: Whilesecrets: inheritis a convenient way to pass credentials, it is widely considered a security anti-pattern in GitHub Actions [6][7][8]. By usinginherit, the reusable workflow—which may be maintained by another team or reside in a different repository—gains access to every secret defined in the caller's repository [5]. This violates the principle of least privilege, as it widens the "blast radius" should the reusable workflow be compromised [7][5]. Modern security tools (such as Semgrep, OpenRewrite, and specialized ESLint plugins) often flag this practice as a high-severity risk and recommend explicitly passing only the specific secrets required by the called workflow [6][7][5][8].Citations:
secrets: inheritdetection rule semgrep/semgrep-rules#3803Avoid passing all repository secrets into the reusable workflow.
secrets: inheritexposes every repository/organization secret available to this workflow topython-mutation.yml. Setsecrets: inheritonly if this reusable workflow actually consumes a secret; otherwise pass only the required secrets explicitly or remove the inheritance.🧰 Tools
🪛 zizmor (1.28.0)
[warning] 42-42: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow
(secrets-inherit)
🤖 Prompt for AI Agents
Sources: Path instructions, Linters/SAST tools