Skip to content

Commit

Permalink
Add Sansec eComscan workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mage-os-ci committed Dec 30, 2024
1 parent 7d6beca commit a88593e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/sansec-ecomscan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Sansec eComscan Security Scan

on:
push:
pull_request_target:
workflow_dispatch:

jobs:
run-ecomscan:
name: Run Sansec eComscan
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false

- name: Download eComscan
run: wget https://ecomscan.com/downloads/linux-amd64/ecomscan

- name: Fix permissions
run: chmod +x ecomscan

- name: Run eComscan
env:
ECOMSCAN_KEY: ${{ secrets.SANSEC_LICENSE_KEY }}
run: |
output=$$(./ecomscan --no-auto-update --skip-database --deep --format=csv .)
if [ -n "$$output" ]; then
echo "Security issues found:"
echo "$$output"
exit 1
fi

0 comments on commit a88593e

Please sign in to comment.