Skip to content

Commit

Permalink
Added required permissions in the action example
Browse files Browse the repository at this point in the history
  • Loading branch information
danacr committed Aug 7, 2023
1 parent d1ee3d7 commit b23652d
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _templates/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for <%= @name %> using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions cocoapods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for CocoaPods using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for dotNET using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions golang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Golang using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions gradle-jdk11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Gradle using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions gradle-jdk12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Gradle using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions gradle-jdk14/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Gradle using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions gradle-jdk16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Gradle using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Gradle using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions maven-3-jdk-11/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Maven using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Maven using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Node using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for PHP using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions python-3.6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Python using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions python-3.7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Python using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions python-3.8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Python using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Python using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Ruby using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
6 changes: 6 additions & 0 deletions scala/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ name: Example workflow for Scala using Snyk
on: push
jobs:
security:
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down

0 comments on commit b23652d

Please sign in to comment.