|
| 1 | +name: "Code scanning - action" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches-ignore: "dependabot/**" |
| 7 | + schedule: |
| 8 | + - cron: "0 4 * * 6" |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read # to fetch code (actions/checkout) |
| 12 | + |
| 13 | +jobs: |
| 14 | + CodeQL-Build: |
| 15 | + permissions: |
| 16 | + contents: read # to fetch code (actions/checkout) |
| 17 | + security-events: write # (github/codeql-action/autobuild) |
| 18 | + |
| 19 | + runs-on: ubuntu-latest |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Checkout repository |
| 23 | + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 |
| 24 | + with: |
| 25 | + # We must fetch at least the immediate parents so that if this is |
| 26 | + # a pull request then we can checkout the head. |
| 27 | + fetch-depth: 2 |
| 28 | + |
| 29 | + # If this run was triggered by a pull request event, then checkout |
| 30 | + # the head of the pull request instead of the merge commit. |
| 31 | + - run: git checkout HEAD^2 |
| 32 | + if: ${{ github.event_name == 'pull_request' }} |
| 33 | + |
| 34 | + # Initializes the CodeQL tools for scanning. |
| 35 | + - name: Initialize CodeQL |
| 36 | + uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 |
| 37 | + # Override language selection by uncommenting this and choosing your languages |
| 38 | + # with: |
| 39 | + # languages: go, javascript, csharp, python, cpp, java |
| 40 | + |
| 41 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 42 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 43 | + - name: Autobuild |
| 44 | + uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 |
| 45 | + |
| 46 | + # ℹ️ Command-line programs to run using the OS shell. |
| 47 | + # 📚 https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 48 | + |
| 49 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
| 50 | + # and modify them (or add more) to build your code if your project |
| 51 | + # uses a compiled language |
| 52 | + |
| 53 | + #- run: | |
| 54 | + # make bootstrap |
| 55 | + # make release |
| 56 | + |
| 57 | + - name: Perform CodeQL Analysis |
| 58 | + uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10 |
0 commit comments