Repository navigation
Preserve update-time user files and make release preparation idempotent #84
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: '43 6 * * 2' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: security-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| codeql: | |
| name: CodeQL (${{ matrix.language }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - language: csharp | |
| build-mode: manual | |
| - language: python | |
| build-mode: none | |
| - language: actions | |
| build-mode: none | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6 | |
| if: matrix.language == 'csharp' | |
| with: | |
| dotnet-version: 10.0.x | |
| - uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.build-mode }} | |
| - name: Build C# for analysis | |
| if: matrix.language == 'csharp' | |
| run: | | |
| dotnet restore --locked-mode | |
| dotnet build --configuration Release --no-restore --no-incremental | |
| - uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4 | |
| with: | |
| category: '/language:${{ matrix.language }}' | |
| output: codeql-results | |
| - name: Summarize scan findings | |
| if: always() | |
| run: | | |
| python3 - <<'PYCODE' | |
| import json | |
| from pathlib import Path | |
| for report in sorted(Path('codeql-results').glob('*.sarif')): | |
| for run in json.loads(report.read_text()).get('runs', []): | |
| for result in run.get('results', []): | |
| locations = [item.get('physicalLocation', {}) for item in result.get('locations', [])] | |
| print(json.dumps({'rule': result.get('ruleId'), 'message': result.get('message'), 'locations': locations})) | |
| PYCODE | |
| dependencies: | |
| name: Dependency review | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 | |
| with: | |
| fail-on-severity: high | |
| comment-summary-in-pr: never |