-
Notifications
You must be signed in to change notification settings - Fork 18
ci: add release-please and conventional commit enforcement #333
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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Lint PR Title | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, edited, synchronize] | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| lint_title: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||||||||||||||||||||||||||
| name: Release Please | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||
| release-please: | ||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||
| - name: Generate token | ||||||||||||||||||||||||||||||||||
| id: generate-token | ||||||||||||||||||||||||||||||||||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| app-id: ${{ vars.SDK_BOT_APP_ID }} | ||||||||||||||||||||||||||||||||||
| private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+18
to
+23
Contributor
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. Mutable action tags replace SHA-pinned references The removed workflows ( Pin both actions to their current SHAs to maintain the same security posture as the removed workflows:
Suggested change
(Replace the example SHAs above with the actual current HEAD SHAs from each action's repository before merging.) |
||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||
| token: ${{ steps.generate-token.outputs.token }} | ||||||||||||||||||||||||||||||||||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "4.30.1" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
| "packages": { | ||
| ".": { | ||
| "release-type": "php", | ||
| "package-name": "workos/workos-php", | ||
| "changelog-path": "CHANGELOG.md", | ||
| "extra-files": [ | ||
| { | ||
| "type": "generic", | ||
| "path": "lib/Version.php" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
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.
Unpinned action tag
amannn/action-semantic-pull-request@v5uses a mutable tag, consistent with the regression noted inrelease-please.yml. Because this workflow runs onpull_request_target(which has access to repository secrets), an attacker who can push to the action'sv5tag could exfiltrate theGITHUB_TOKEN.Pin to the SHA corresponding to the
v5release:(Replace the example SHA with the actual SHA from the action's repository.)