Skip to content

Commit

Permalink
sast-horusec action sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiago committed Jul 23, 2024
1 parent 4ff8942 commit 26872a2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/sast-horusec-vampi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ jobs:
run-scripts:
runs-on: ubuntu-latest

name: Horusec Scan


steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: SAST - Horusec Run 🐞
run: |
ls -R
Expand All @@ -28,7 +31,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: SAST - Horusec Scan
path: reports/horusec_report.md
path: ./targets/apps/VAmPI-master/reports/horusec_report.md

- name: SAST - Horusec Results In Summary πŸ’πŸ½
run: cat ./targets/apps/VAmPI-master/reports/horusec_report.md >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion targets/apps/VAmPI-master/trigger.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
trigger
trigger!
38 changes: 38 additions & 0 deletions tools/horusec/sast-horusec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Horusec (SAST), Generate Script and Save Artifact

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
run-scripts:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: SAST - Horusec Run 🐞
run: |
curl -sL https://raw.githubusercontent.com/0xtiago/opensource-devsecops/main/tools/horusec/horusec_linux.sh| bash
- name: SAST - Horusec Report Generation πŸ“Š
run: |
cd reports
pip install -r https://raw.githubusercontent.com/0xtiago/opensource-devsecops/main/tools/horusec/horusec_json2md/requirements.txt
curl -sL https://raw.githubusercontent.com/0xtiago/opensource-devsecops/main/tools/horusec/horusec_json2md/horusec_json2md.py -o horusec_json2md.py
python3 horusec_json2md.py horusec_report.json horusec_report.md
- name: SAST - Horusec Upload Report Artifact πŸ’Ύ
uses: actions/upload-artifact@v3
with:
name: SAST - Horusec Scan
path: reports/horusec_report.md

- name: SAST - Horusec Results In Summary πŸ’πŸ½
run: cat reports/horusec_report.md >> $GITHUB_STEP_SUMMARY

0 comments on commit 26872a2

Please sign in to comment.