-
Notifications
You must be signed in to change notification settings - Fork 0
ci: replace GitHub App token with GITHUB_TOKEN in release workflows #23
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 | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -71,21 +71,11 @@ jobs: | |||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||
| - name: Generate token | ||||||||||||||||||||||||||||
| id: generate_token | ||||||||||||||||||||||||||||
| uses: actions/create-github-app-token@v2 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| app-id: ${{ secrets.GH_APP_ID }} | ||||||||||||||||||||||||||||
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| token: ${{ steps.generate_token.outputs.token }} | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| - name: Create GitHub Release | ||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||
| token: ${{ steps.generate_token.outputs.token }} | ||||||||||||||||||||||||||||
| tag_name: ${{ needs.setup.outputs.tag }} | ||||||||||||||||||||||||||||
| name: image-resize ${{ needs.setup.outputs.version }} | ||||||||||||||||||||||||||||
| draft: false | ||||||||||||||||||||||||||||
|
|
@@ -108,6 +98,4 @@ jobs: | |||||||||||||||||||||||||||
| is_prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }} | ||||||||||||||||||||||||||||
| skip_create_release: true | ||||||||||||||||||||||||||||
| dry_run: ${{ needs.setup.outputs.dry_run == 'true' }} | ||||||||||||||||||||||||||||
| secrets: | ||||||||||||||||||||||||||||
| GH_APP_ID: ${{ secrets.GH_APP_ID }} | ||||||||||||||||||||||||||||
| GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }} | ||||||||||||||||||||||||||||
| secrets: inherit | ||||||||||||||||||||||||||||
|
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
wf=".github/workflows/_rust-binary.yml"
echo "== workflow_call header =="
sed -n '1,40p' "$wf"
echo
echo "== direct secret references in reusable workflow =="
rg -n -C2 '\bsecrets\.' "$wf" || true
echo
echo "== lines using github.token =="
rg -n -C1 '\bgithub\.token\b' "$wf"Repository: iii-hq/workers Length of output: 1453 Remove The Suggested fix binary-build:
name: Binary Release
needs: [setup, create-release]
if: ${{ !failure() && !cancelled() }}
uses: ./.github/workflows/_rust-binary.yml
with:
bin_name: image-resize
manifest_path: image-resize/Cargo.toml
tag_name: ${{ needs.setup.outputs.tag }}
is_prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }}
skip_create_release: true
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
- secrets: inherit📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: iii-hq/workers
Length of output: 1588
Remove unnecessary secret inheritance.
Line 101 forwards every available secret into the reusable workflow even though
.github/workflows/_rust-binary.ymldeclares noworkflow_call.secretsand contains nosecrets.references. This unnecessarily broadens secret exposure to the called workflow and its third-party actions.Suggested fix
binary-build: name: Binary Release needs: [setup, create-release] if: ${{ !failure() && !cancelled() }} uses: ./.github/workflows/_rust-binary.yml with: bin_name: iii-lsp manifest_path: iii-lsp/Cargo.toml tag_name: ${{ needs.setup.outputs.tag }} is_prerelease: ${{ needs.setup.outputs.is_prerelease == 'true' }} skip_create_release: true dry_run: ${{ needs.setup.outputs.dry_run == 'true' }} - secrets: inherit🤖 Prompt for AI Agents