feat: improve OpenId Configuration fetching to prevent DoS #2445
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: Composition CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'pnpm-lock.yaml' | |
| - "composition/**/*" | |
| - "composition-go/**/*" | |
| # composition-go uses code from shared/ | |
| - "shared/**/*" | |
| - ".github/workflows/composition-ci.yaml" | |
| concurrency: | |
| group: ${{github.workflow}}-${{github.head_ref}} | |
| cancel-in-progress: true | |
| env: | |
| CI: true | |
| DO_NOT_TRACK: '1' | |
| jobs: | |
| build_test: | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/node | |
| - uses: ./.github/actions/go | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Generate code | |
| run: pnpm buf generate --template buf.ts.gen.yaml | |
| - name: Generate code to be embedded in Go library | |
| run: ./generate.sh | |
| working-directory: composition-go | |
| - uses: ./.github/actions/git-dirty-check | |
| with: | |
| package-name: composition-go | |
| - name: Build | |
| run: pnpm run --filter ./composition --filter ./connect --filter ./shared build | |
| - name: Test | |
| run: pnpm run --filter composition test:coverage | |
| - name: Lint | |
| run: pnpm run --filter composition lint | |
| - name: Upload integration results to Codecov | |
| uses: ./.github/actions/codecov-upload-pr | |
| with: | |
| artifact-name: composition-tests-coverage | |
| coverage-path: | | |
| composition/coverage/clover.xml | |
| composition/coverage/coverage-final.json | |
| retention-days: 14 | |
| codecov-token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run linter on composition-go | |
| uses: ./.github/actions/go-linter | |
| with: | |
| working-directory: ./composition-go | |
| - name: Test Go library | |
| run: go test -coverprofile=coverage_normal.out -coverpkg=github.com/wundergraph/cosmo/composition-go/... | |
| working-directory: composition-go | |
| - name: Test Go library with V8 | |
| run: go test -tags wg_composition_v8 -coverprofile=coverage_v8.out -coverpkg=github.com/wundergraph/cosmo/composition-go/... | |
| working-directory: composition-go | |
| - name: Upload integration results to Codecov | |
| uses: ./.github/actions/codecov-upload-pr | |
| with: | |
| artifact-name: composition-go-tests-coverage | |
| coverage-path: | | |
| composition-go/coverage_normal.out | |
| composition-go/coverage_v8.out | |
| retention-days: 14 | |
| codecov-token: ${{ secrets.CODECOV_TOKEN }} |