Merge pull request #437 from gofiber/codex/2025-10-17-10-30-15 #263
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: Gosec Security Scan | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| - "main" | |
| paths-ignore: | |
| - "**.md" | |
| - LICENSE | |
| - ".github/ISSUE_TEMPLATE/*.yml" | |
| - ".github/dependabot.yml" | |
| pull_request: | |
| branches: | |
| - "*" | |
| paths-ignore: | |
| - "**.md" | |
| - LICENSE | |
| - ".github/ISSUE_TEMPLATE/*.yml" | |
| - ".github/dependabot.yml" | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.changed-files.outputs.all_changed_files }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Changed Files | |
| uses: tj-actions/changed-files@v46 | |
| id: changed-files | |
| with: | |
| files_ignore: | | |
| .github/** | |
| **.md | |
| json: true | |
| escape_json: false | |
| dir_names: true | |
| dir_names_max_depth: '1' | |
| dir_names_exclude_current_dir: true | |
| gosec-scan: | |
| runs-on: ubuntu-latest | |
| needs: detect-changes | |
| if: ${{ needs.detect-changes.outputs.matrix != 'null' }} | |
| env: | |
| GO111MODULE: on | |
| strategy: | |
| matrix: | |
| modules: ${{ fromJSON(needs.detect-changes.outputs.matrix) }} | |
| steps: | |
| - name: Fetch Repository | |
| uses: actions/checkout@v5 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.x' | |
| check-latest: true | |
| cache: false | |
| - name: Install gosec | |
| run: go install github.com/securego/gosec/v2/cmd/gosec@latest | |
| - name: Run gosec | |
| working-directory: ${{ matrix.modules }} | |
| run: gosec ./... |