-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Initial commit. Co-Authored-By: Alex de Borba <[email protected]>
- Loading branch information
1 parent
06372a3
commit a27b316
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |