Skip to content
Prev Previous commit
Next Next commit
gh token fi
  • Loading branch information
witmicko committed Dec 9, 2025
commit 10735dd5d6900399cce2edc4f11015d970cd9280
8 changes: 4 additions & 4 deletions .github/workflows/onboard-new-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ jobs:
echo "base_branch=$BASE_BRANCH" >> $GITHUB_OUTPUT
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.ONBOARDING_TOKEN }}
Copy link

Choose a reason for hiding this comment

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

Bug: Opt-out file check documented but never implemented

The PR body template instructs users to add a .github/no-security-scanner file to prevent future onboarding attempts, but the workflow never checks for this file's existence. The onboarding will proceed regardless of whether a team has opted out, making the documented opt-out mechanism non-functional.

Additional Locations (1)

Fix in Cursor Fix in Web


- name: Checkout target repository
uses: actions/checkout@v4
with:
repository: ${{ steps.target.outputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.ONBOARDING_TOKEN }}
path: target-repo
ref: ${{ steps.target.outputs.base_branch }}
Copy link

Choose a reason for hiding this comment

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

Bug: Opt-out file check documented but never implemented

The PR body template tells users to add a .github/no-security-scanner file to prevent future onboarding attempts, but the workflow never checks for this file's existence. Repositories that have opted out will still receive onboarding PRs, causing frustration for teams that explicitly declined the scanner.

Additional Locations (1)

Fix in Cursor Fix in Web


Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Create Pull Request
working-directory: target-repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.ONBOARDING_TOKEN }}
REPO_NAME: ${{ steps.target.outputs.repository }}
run: |
# Extract owner and repo name for URL construction
Expand All @@ -117,7 +117,7 @@ jobs:
- name: Output PR URL
working-directory: target-repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.ONBOARDING_TOKEN }}
run: |
PR_URL=$(gh pr view security/add-sast-scanner --json url -q .url)
echo "✅ Pull Request created: $PR_URL"
Expand Down