Skip to content

Commit

Permalink
Create security-audit.yml
Browse files Browse the repository at this point in the history
- Initial commit.

Co-Authored-By: Alex de Borba <[email protected]>
  • Loading branch information
atmostfear-entertainment and alexdeborba committed Aug 30, 2024
1 parent 06372a3 commit a27b316
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: "PHP Security Audit"

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight (UTC)

permissions:
contents: "read"

jobs:
security_audit:
name: "Run PHP Security Audit"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"

- name: Install PHP dependencies
run: composer install

- name: "Download and Run PHP Security Checker"
run: |
curl -s https://api.github.com/repos/fabpot/local-php-security-checker/releases/latest \
| grep "browser_download_url.*local-php-security-checker_.*_linux_amd64" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi - -O local-php-security-checker \
&& chmod +x local-php-security-checker \
&& ./local-php-security-checker

0 comments on commit a27b316

Please sign in to comment.