Skip to content

GitHub Audit

GitHub Audit #646

Workflow file for this run

on:
workflow_dispatch:
schedule:
# Audit repos twice a day.
- cron: '0 0,12 * * *'
name: GitHub Audit
permissions: {}
jobs:
ghaudit:
runs-on: ubuntu-latest
permissions:
contents: read # To read the repo contents
id-token: write # To federate with Octo STS
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: octo-sts/action@a26b0c6455c7f13316f29a8766287f939e75f6c8 # v1.0.2
id: octo-sts
with:
scope: ${{ github.repository_owner }}
identity: ghaudit
- name: Deploy Keys
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # # v0.0.1
env:
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
with:
packages: ghaudit
command: ghaudit org -o ${{ github.repository_owner }} deploy-keys
- name: Branch Protections
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # # v0.0.1
env:
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
with:
packages: ghaudit
command: ghaudit org -o ${{ github.repository_owner }} branch-protections
- name: Default Permissions
uses: wolfi-dev/wolfi-act@d78f3659c50c4520e222df428f4903a1c4b0c6ee # v0.0.1
env:
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
with:
packages: ghaudit
command: ghaudit org -o ${{ github.repository_owner }} default-permissions
- uses: step-security/action-slack-notify@e04c77a65bae8b6c0373478a1cb8fd7e012637e6 # v2.3.5
if: ${{ failure() }}
env:
SLACK_ICON: http://github.com/chainguard-dev.png?size=48
SLACK_USERNAME: guardian
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CHANNEL: '@mattmoor'
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: GitHub Audit of ${{ github.repository_owner }} failed.
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}