diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 576c0f16..c11d0295 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -7,30 +7,8 @@ on: pull_request: branches: - main - schedule: - - cron: '0 0 * * 0' jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: python - - - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@v1 - linting: name: Linting runs-on: ubuntu-latest diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 00000000..1b954596 --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,75 @@ +name: Security + +on: + push: + branches: + - main + pull_request: + branches: + - main + # every Sunday at midnight + schedule: + - cron: '0 0 * * 0' + +permissions: + actions: read + contents: read + security-events: write + +jobs: + codeql: + name: CodeQL + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: python + + - name: Run CodeQL + uses: github/codeql-action/analyze@v1 + + ossar: + name: OSSAR + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Run OSSAR + id: ossar + uses: github/ossar-action@v1 + + - name: Upload OSSAR results + if: always() + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: ${{ steps.ossar.outputs.sarifFile }} + + semgrep: + name: Semgrep + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Run Semgrep + uses: returntocorp/semgrep-action@v1 + with: + config: >- + p/ci + p/secrets + auditOn: push + generateSarif: true + + - name: Upload Semgrep results + if: always() + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: semgrep.sarif diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 895000a8..f2faef3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Tests on: push: branches: - - '*' + - main paths-ignore: - 'docs/**' - '**.md'