-
Notifications
You must be signed in to change notification settings - Fork 51
chore: add workflow stubs for testing #312
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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Stub workflow to enable dispatch from feature branches | ||
| # Real implementation is on chore/ci-improvements branch | ||
| name: Release AppKit | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| platform: | ||
| description: 'Platform to build' | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - android | ||
| - ios | ||
| release-type: | ||
| description: 'Release type' | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - internal | ||
| - production | ||
| e2e-build: | ||
| description: 'Build for E2E tests (uploads to S3 for AppKit SDK repo tests)' | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
|
|
||
| jobs: | ||
| stub: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: echo "This is a stub. Run from feature branch with --ref" | ||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | |||||||||||||||||||||||||||||
| # Stub workflow to enable dispatch from feature branches | |||||||||||||||||||||||||||||
| # Real implementation is on chore/ci-improvements branch | |||||||||||||||||||||||||||||
| name: Release Mobile POS | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||
| workflow_dispatch: | |||||||||||||||||||||||||||||
| inputs: | |||||||||||||||||||||||||||||
| platform: | |||||||||||||||||||||||||||||
| description: 'Platform to build' | |||||||||||||||||||||||||||||
| required: true | |||||||||||||||||||||||||||||
| type: choice | |||||||||||||||||||||||||||||
| options: | |||||||||||||||||||||||||||||
| - android | |||||||||||||||||||||||||||||
| - ios | |||||||||||||||||||||||||||||
| variant: | |||||||||||||||||||||||||||||
| description: 'App variant' | |||||||||||||||||||||||||||||
| required: true | |||||||||||||||||||||||||||||
| type: choice | |||||||||||||||||||||||||||||
| options: | |||||||||||||||||||||||||||||
| - production | |||||||||||||||||||||||||||||
| - legacy | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||
| stub: | |||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||
| - run: echo "This is a stub. Run from feature branch with --ref" | |||||||||||||||||||||||||||||
|
Comment on lines
+25
to
+27
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI about 11 hours ago In general, the fix is to explicitly define a The best way to fix this without changing functionality is to add a workflow-level permissions:
contents: readbetween the existing
Suggested changeset
1
.github/workflows/release-pos.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||||||||||||||||||||||
| # Stub workflow to enable dispatch from feature branches | ||||||||||||||||||||||||||
| # Real implementation is on chore/ci-improvements branch | ||||||||||||||||||||||||||
| name: Release WalletKit | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||
| inputs: | ||||||||||||||||||||||||||
| platform: | ||||||||||||||||||||||||||
| description: 'Platform to build' | ||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||
| type: choice | ||||||||||||||||||||||||||
| options: | ||||||||||||||||||||||||||
| - android | ||||||||||||||||||||||||||
| - ios | ||||||||||||||||||||||||||
| release-type: | ||||||||||||||||||||||||||
| description: 'Release type' | ||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||
| type: choice | ||||||||||||||||||||||||||
| options: | ||||||||||||||||||||||||||
| - internal | ||||||||||||||||||||||||||
| - production | ||||||||||||||||||||||||||
| e2e-build: | ||||||||||||||||||||||||||
| description: 'Build for E2E tests (uploads to S3 for AppKit SDK repo tests)' | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| description: 'Build for E2E tests (uploads to S3 for AppKit SDK repo tests)' | |
| description: 'Build for E2E tests (uploads to S3 for WalletKit SDK repo tests)' |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 11 hours ago
In general, the fix is to explicitly specify permissions for the workflow or each job so that the GITHUB_TOKEN is restricted to the minimum needed (or fully disabled) rather than inheriting potentially broad repository defaults.
For this specific stub workflow, the job only prints a message and does not interact with the GitHub API, so the safest and least-privileged configuration is to set permissions: {} at the workflow (top) level. This disables all default permissions for GITHUB_TOKEN for all jobs in this workflow. Concretely, in .github/workflows/release-walletkit.yaml, add a permissions: {} block near the top-level metadata (e.g., after the name: line and before the on: block). No other functionality changes are required and no additional imports or methods are needed, since this is pure YAML configuration.
-
Copy modified line R4
| @@ -1,6 +1,7 @@ | ||
| # Stub workflow to enable dispatch from feature branches | ||
| # Real implementation is on chore/ci-improvements branch | ||
| name: Release WalletKit | ||
| permissions: {} | ||
|
|
||
| on: | ||
| workflow_dispatch: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI about 11 hours ago
In general, the fix is to explicitly define a
permissionsblock for the workflow (or specific jobs) that grants only the minimal required scopes toGITHUB_TOKEN. For a stub job that only runs a shellechocommand and does not interact with the GitHub API or repository contents, the safest and most accurate configuration is to fully disableGITHUB_TOKENby settingpermissions: {}at the workflow level.Concretely, in
.github/workflows/release-appkit.yaml, add apermissions: {}block near the top of the workflow (after thename:line and beforeon:) so that it applies to all jobs. This ensures that thestubjob has no token permissions at all, matching its current behavior and not changing any existing functionality. No imports or additional definitions are needed because this is a YAML configuration change only.