Conversation
Uses the SDK bot app token with amannn/action-semantic-pull-request to enforce conventional commit format on PR titles, which is required for release-please to work correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryThis PR adds a new GitHub Actions workflow ( Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PR as Pull Request
participant GH as GitHub Actions
participant WF as Lint PR Title workflow
participant Tok as create-github-app-token
participant Lint as action-semantic-pull-request
PR->>GH: pull_request_target (opened/edited/synchronize)
GH->>WF: Start job
WF->>Tok: Generate GitHub App installation token
Tok-->>WF: token
WF->>Lint: Validate PR title (uses GITHUB_TOKEN env)
Lint-->>WF: Pass/Fail status
WF-->>GH: Report check result
|
| on: | ||
| pull_request_target: | ||
| types: |
There was a problem hiding this comment.
pull_request_target token risk
Using pull_request_target plus a generated GitHub App token exposes a write-capable token to workflows triggered by PRs from forks. Even though this workflow doesn’t check out or run PR code, the token is still available to the action and could be abused if the action is compromised or misconfigured. Prefer pull_request (read-only token is sufficient to read PR title) or avoid minting an app token here unless a specific API permission is required.
| - name: Generate token | ||
| id: generate-token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: ${{ vars.SDK_BOT_APP_ID }} | ||
| private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} |
There was a problem hiding this comment.
Unnecessary App token use
action-semantic-pull-request can run with the default GITHUB_TOKEN for pull_request events; generating an SDK bot app token here increases blast radius if anything in the job leaks env vars. If you keep pull_request_target, consider removing the app token step and use the default token with minimal permissions: explicitly set (e.g., pull-requests: read).
Summary
lint-pr-titleworkflow usingamannn/action-semantic-pull-requestto enforce conventional commit format on PR titlesactions/create-github-app-token) for authentication, consistent with therelease-pleaseworkflowTest plan
🤖 Generated with Claude Code