Skip to content

Commit

Permalink
ci: added GitHub Actions permissions monitoring
Browse files Browse the repository at this point in the history
Added the GitHubSecurityLab/actions-permissions/monitor action to advisor.yml, build.yml, and publish.yml files. This action will monitor permissions based on the provided config file.
  • Loading branch information
matfax committed Jul 11, 2023
1 parent 6861f84 commit 354d8df
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/advisor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: permissions advisor

permissions:
actions: read

on:
workflow_dispatch:
inputs:
name:
description: 'The name of the workflow file to analyze'
required: true
type: string
count:
description: 'How many last runs to analyze'
required: false
type: number
default: 10

jobs:
advisor:
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/[email protected]
with:
name: ${{ inputs.name }}
count: ${{ inputs.count }}
3 changes: 3 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
run:
shell: bash
steps:
- uses: GitHubSecurityLab/actions-permissions/[email protected]
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- uses: actions/[email protected]
- name: setting up python ${{ matrix.python-version }}
uses: actions/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
shell: bash
name: python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: GitHubSecurityLab/actions-permissions/[email protected]
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- uses: actions/[email protected]
- name: setting up python ${{ matrix.python-version }}
uses: actions/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
run:
shell: bash
steps:
- uses: GitHubSecurityLab/actions-permissions/[email protected]
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- uses: actions/[email protected]
- name: setting up python ${{ matrix.python-version }}
uses: actions/[email protected]
Expand Down

0 comments on commit 354d8df

Please sign in to comment.