Security Scan #23
This file contains hidden or 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
| name: Security Scan | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 3 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| pull-requests: write | |
| packages: read | |
| jobs: | |
| security-scan: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run Security Scan | |
| id: scan | |
| uses: cloudon-one/[email protected] | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| fail_on_critical: true | |
| scan_type: all | |
| create_pr_comment: true | |
| - name: Display scan results | |
| if: always() | |
| run: | | |
| echo "## Security Scan Results" | |
| echo "================================" | |
| echo "Risk Level: ${{ steps.scan.outputs.risk_level }}" | |
| echo "Critical: ${{ steps.scan.outputs.critical_count }}" | |
| echo "High: ${{ steps.scan.outputs.high_count }}" | |
| echo "Medium: ${{ steps.scan.outputs.medium_count }}" | |
| echo "Low: ${{ steps.scan.outputs.low_count }}" | |
| echo "Secrets Found: ${{ steps.scan.outputs.secrets_found }}" | |
| echo "Vulnerabilities: ${{ steps.scan.outputs.vulnerabilities_found }}" | |
| echo "Misconfigurations: ${{ steps.scan.outputs.misconfigurations_found }}" | |
| echo "Report: ${{ steps.scan.outputs.report_url }}" | |
| echo "================================" | |
| - name: Upload scan artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: security-scan-results-${{ github.run_number }} | |
| path: /tmp/security-scan-results/ | |
| retention-days: 30 |