Skip to content

Commit

Permalink
Merge pull request #589 from vmware/fix-workflow-permissions
Browse files Browse the repository at this point in the history
Add permissions to Github Workflows
  • Loading branch information
VenelinBakalov authored Jan 10, 2025
2 parents 6c10af5 + 96473d9 commit fa8c4d5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 98 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- "main" # trigger the workflow for main branch
workflow_dispatch:

permissions:
actions: write
contents: write

jobs:
build:
strategy:
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/codeql-java.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/codeql-js.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
steps:

- name: Validate actor permissions
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ on:
pull_request:
workflow_dispatch:

permissions: {}

jobs:
super-linter:
name: Lint all code
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
build:
name: Run vulnerability scan
runs-on: ubuntu-22.04
permissions:
contents: write
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db,aquasec/trivy-db,ghcr.io/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db,aquasec/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
Expand Down

0 comments on commit fa8c4d5

Please sign in to comment.