-
Notifications
You must be signed in to change notification settings - Fork 11
Migrate to gha only #614
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
Migrate to gha only #614
Changes from all commits
c45b8eb
9f0a01a
75affb6
cbbc8c4
d138b64
f6cb3ef
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,63 @@ | ||||||||||||||||||||||||||||||||
| # Build and test workflow for Launchpad | ||||||||||||||||||||||||||||||||
| # Triggered on PRs and pushes to main. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| name: Build and Test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||
| branches: [ main ] | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
| branches: [ main ] | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||
| name: Build Binaries | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Build binaries | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| mkdir -p dist | ||||||||||||||||||||||||||||||||
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | ||||||||||||||||||||||||||||||||
| for platform in "${platforms[@]}"; do | ||||||||||||||||||||||||||||||||
| GOOS=${platform%/*} | ||||||||||||||||||||||||||||||||
| GOARCH=${platform#*/} | ||||||||||||||||||||||||||||||||
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | ||||||||||||||||||||||||||||||||
| if [ "$GOOS" = "windows" ]; then | ||||||||||||||||||||||||||||||||
| output_name+=".exe" | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
| echo "Building $output_name" | ||||||||||||||||||||||||||||||||
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | ||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Upload artifacts | ||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| name: launchpad-binaries | ||||||||||||||||||||||||||||||||
| path: dist/ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||||
| name: Run Tests | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| needs: build | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.22" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run unit tests | ||||||||||||||||||||||||||||||||
| run: go test -v ./... | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run integration tests | ||||||||||||||||||||||||||||||||
| run: go test -v -tags=integration ./test/integration | ||||||||||||||||||||||||||||||||
|
Comment on lines
+47
to
+63
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: {contents: read}
Copilot AutofixAI 3 months ago In general, fix this by adding a The best minimal fix without changing behavior is to add a workflow-level Concretely:
permissions:
contents: readbetween the
Suggested changeset
1
.github/workflows/build.yml
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,99 @@ | ||||||||||||||||||||||||||||||||
| # PR validation workflow for Launchpad | ||||||||||||||||||||||||||||||||
| # Triggered on PRs to main branch. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| name: PR Validation | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||
| branches: [ main ] | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| lint: | ||||||||||||||||||||||||||||||||
| name: Lint Code | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run golangci-lint | ||||||||||||||||||||||||||||||||
| run: make lint | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| unit-test: | ||||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+26
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: {contents: read}
Copilot AutofixAI 3 months ago In general, the fix is to explicitly define a The best change with no functional impact is to add a top-level Concretely:
permissions:
contents: readbetween the existing
Suggested changeset
1
.github/workflows/pr.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| name: Unit Tests | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run unit tests | ||||||||||||||||||||||||||||||||
| run: make unit-test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| integration-test: | ||||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
+41
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: {contents: read}
Copilot AutofixAI 3 months ago In general, fix this by adding an explicit The single best fix without changing existing functionality is: in name: PR Validation
permissions:
contents: read
on:
pull_request:
branches: [ main ]This restricts the
Suggested changeset
1
.github/workflows/pr.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| name: Integration Tests | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run integration tests | ||||||||||||||||||||||||||||||||
| run: make integration-test | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| build-verification: | ||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+56
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: {contents: read}
Copilot AutofixAI 3 months ago In general, the fix is to explicitly define the GITHUB_TOKEN permissions at the workflow or job level, granting only what is needed. Since all jobs in this workflow only perform read operations on the repository (checkout, build, test, security scan) and do not create or modify issues, PRs, releases, etc., they can safely run with Concretely, in permissions:
contents: readbetween the
Suggested changeset
1
.github/workflows/pr.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| name: Build Verification | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Build binaries | ||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||
| mkdir -p dist | ||||||||||||||||||||||||||||||||
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | ||||||||||||||||||||||||||||||||
| for platform in "${platforms[@]}"; do | ||||||||||||||||||||||||||||||||
| GOOS=${platform%/*} | ||||||||||||||||||||||||||||||||
| GOARCH=${platform#*/} | ||||||||||||||||||||||||||||||||
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | ||||||||||||||||||||||||||||||||
| if [ "$GOOS" = "windows" ]; then | ||||||||||||||||||||||||||||||||
| output_name+=".exe" | ||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||
| echo "Building $output_name" | ||||||||||||||||||||||||||||||||
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | ||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| security-scan: | ||||||||||||||||||||||||||||||||
|
Comment on lines
+57
to
+83
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: {contents: read}
Copilot AutofixAI 3 months ago To fix the problem, explicitly restrict the Concretely, in permissions:
contents: readNo other imports, methods, or definitions are required; this is purely a YAML configuration change inside the existing workflow file. This change does not alter the functional behavior of the jobs, because they only require read access to the repository.
Suggested changeset
1
.github/workflows/pr.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
| name: Security Scan | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Set up Go | ||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| go-version: "1.25" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Install govulncheck | ||||||||||||||||||||||||||||||||
| run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| - name: Run security scan | ||||||||||||||||||||||||||||||||
| run: govulncheck ./... | ||||||||||||||||||||||||||||||||
|
Comment on lines
+84
to
+99
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: {contents: read}
Copilot AutofixAI 3 months ago In general, the fix is to explicitly declare the minimal Concretely, in
Suggested changeset
1
.github/workflows/pr.yml
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,66 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Release workflow for Launchpad | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Triggered on tags (e.g., v1.5.16). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Release | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tags: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "v*" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Build Release Binaries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Checkout code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set up Go | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-go@v5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| go-version: "1.25" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build binaries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p dist | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for platform in "${platforms[@]}"; do | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GOOS=${platform%/*} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GOARCH=${platform#*/} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "$GOOS" = "windows" ]; then | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output_name+=".exe" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Building $output_name" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| done | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Upload artifacts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: launchpad-release-binaries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: dist/ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| release: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+45
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: {contents: read}
Copilot AutofixAI 3 months ago To fix the problem, explicitly set a The best minimal fix without changing functionality is:
We do not need to modify steps, environment variables, or add imports; the change is purely in
Suggested changeset
1
.github/workflows/release.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Create GitHub Release | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| needs: build | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Download binaries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/download-artifact@v4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: launchpad-release-binaries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: dist/ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Create GitHub Release | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| files: dist/* | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| generate_release_notes: true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| draft: true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # TODO: Add Digicert signing here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # TODO: Push signed artifacts to S3 here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+46
to
+66
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 3 months ago In general, fix this by explicitly defining a For this workflow:
The best minimal change is:
This leaves existing functionality unchanged (the release can still be created) while explicitly documenting and constraining token capabilities. Concretely:
No imports or extra methods are needed because this is a YAML workflow configuration change only.
Suggested changeset
1
.github/workflows/release.yml
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 |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| module github.com/Mirantis/launchpad | ||
| go 1.25 | ||
|
|
||
|
|
||
| go 1.25.0 | ||
|
|
||
| require ( | ||
| al.essio.dev/pkg/shellescape v1.6.0 | ||
|
|
||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 3 months ago
In general, the fix is to explicitly declare a minimal
permissionsblock for the workflow or each job, limitingGITHUB_TOKENto the least privilege required. For this workflow, the actions used (actions/checkout,actions/setup-go,go test,actions/upload-artifact) do not need to write to repository contents or pull requests, socontents: readat the workflow level is sufficient. No other fine-grained scopes (likepull-requests: write) are needed based on the shown steps.The best way to fix this without changing functionality is to add a top-level
permissionsblock right after thename: Build and Testline in.github/workflows/build.yml. This will apply to all jobs that do not override permissions, covering bothbuildandtestjobs. The block should be:No imports or additional definitions are needed, since this is just YAML configuration. The only file to modify is
.github/workflows/build.yml, and the changes are confined to adding the new lines after thename:line (line 4 in the provided snippet).