This code is for an active GitHub Action written in Python to check (on a schedule) for new repositories created on the previous day and open pull requests in the new repositories to enable GitHub advanced security code scanning.
If you need support using this project or have questions about it, please open up an issue in this repository. Requests made directly to GitHub staff or support team will be redirected here to open an issue. GitHub SLA's and support/services contracts do not apply to this repository.
name: Enforce advanced security scanning
on:
workflow_dispatch:
schedule:
- cron: '00 5 * * *'
jobs:
build:
name: Enforce advanced security scanning
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run enforcer tool
uses: zkoppert/advanced-security-enforcer@v2
env:
GH_ACTOR: ${{ secrets.GH_ACTOR }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
ORGANIZATION: ${{ secrets.ORGANIZATION }}
PR_BODY: your text goes here
HOURS_DELAY: 24
env
values above with your information. More info on creating secrets can be found here.HOURS_DELAY
value and set it to a valid int
in order to set what date the action is looking for new repositories on.We would ❤️ contributions to improve this action. Please see CONTRIBUTING.md for how to get involved.
env:
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
HOURS_DELAY: 0
is helpful so that you can create a repository in an org and not wait to test the action against it.env-example
file to .env
.env
file by adding your Personal Access Token to it and the desired organizationpip install -r requirements.txt
python3 enforcer.py
docker build -t test .
docker run -it test