-
Notifications
You must be signed in to change notification settings - Fork 0
Sync with upstream master #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 250 commits
ecdd0b8
7942817
a956bf3
9ed6bf7
281c177
09fee7f
f0a9fa4
1a49fc3
9f199ac
2725903
da180b9
4d103d6
5f0c542
47f2040
25d62b7
dcbaa9d
d8acc5a
b13e020
45b1941
06b3079
227aeb8
f817d8b
c78b28b
9362179
0e97ad5
f7691ce
a522202
5f6d1b1
228deee
f976660
087d4bd
743730f
f3a24b2
a15c4a6
1997f63
167ea52
ec564f2
4bdb4f2
be791c0
e0268e2
894af72
cee32d6
246124e
4c94d8a
b09a9e7
79e28f5
56958b1
2f6a185
c016300
9e37771
27b5f29
52c243f
5c32fad
1855a9a
9bee0b0
f2c2526
4955d43
76d7ed4
489e37d
d90827c
7850337
ad3a83e
9bee809
a5f4956
7c74dd8
2976b23
e640a40
c331bb9
5593fb7
eb9f04b
adec8b4
955142b
dce4638
be13b1f
69f9b7e
29c7b6f
548b0f5
0108be9
49c8228
0807930
5d27abc
25591ee
83697b0
cf17fc6
8db7699
51c66d2
ec26e19
bcc2283
0963bbe
a6962a8
2ecf64e
4c3dffd
9cd6668
c0daa71
3295c72
49dcb4d
d78d744
4311931
44e2749
47e84db
8ab16cf
e5e64c6
e5c14f1
e1d6c38
99c4233
91e985e
a70f592
044dcd5
e79638d
fec4f53
57a601f
fb57055
3ab0947
a11b3cd
7870871
91bf627
8dce952
976e45e
f4c3102
591a201
c03a687
e2462a2
9ba3c3f
74dd7ee
e67c47c
01b6822
a4136db
35c0b56
7bd3c2a
ae8c5af
3d97c59
47b6454
7777773
f80a89d
80d297b
734d60f
13f012f
2bda646
5bbfbbe
0568abe
175dc57
e8f79fe
5a4395f
4fb3e78
fe79863
4433b36
93985de
0f9b7eb
12339f2
6b9ce00
de1e85a
72e63fa
d31ed97
90fd51b
1e65dda
285d83b
7f4a5a7
8af6d3c
cbd7dd7
503ddca
86abd33
8938c98
56914a8
ff5bc7c
7ec1760
c3bc1d7
92f51f9
3b5be6a
5bbc400
449f664
3c7e159
363e9d5
9d22748
2e41d5b
894f87d
cf2c017
08dc8ee
098ab60
896c695
58e387a
9f92c71
9caf0f1
1558aac
31cf652
89f4321
bf323d3
6e695a6
2fa7d80
f90a36c
780cbe1
8031f5b
bc8f045
d4807b6
830fca9
06c5233
142d776
486320d
58f148d
546e66c
3bf25fd
6f2e233
ed88652
61635a6
6511fb9
5b5b467
7bd2f57
af47557
503e461
6e7a983
a10dd9b
a90912e
a0f1231
ea243dd
0977c87
4d4c58d
90bb8eb
832caae
cda5c37
9c138ef
52ef42f
d11dbd2
05c23bd
95fefb4
2fb5d78
6189b20
ae0c5c0
683d1ee
066f34c
0e0b936
f49dddc
eec8f76
410a58f
bdfac38
6f78bb6
acd853b
6f68a40
5d33f94
2d12818
5f9ad5c
75934f3
6cf5b52
ec003f5
ed65360
273de3b
15bed0b
7154549
4c99c75
050b262
d7ba134
98c0b47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: OpenSSF Scorecard | ||
|
|
||
| on: | ||
| branch_protection_rule: | ||
| push: | ||
| branches: [ main ] | ||
| schedule: | ||
| - cron: '30 0 * * 5' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| id-token: write | ||
| security-events: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run analysis | ||
| uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
| with: | ||
| results_file: results.sarif | ||
| results_format: sarif | ||
| publish_results: true | ||
|
|
||
| - name: Upload results as artifact | ||
| uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
| with: | ||
| name: OpenSSF Scorecard results | ||
| path: results.sarif | ||
| retention-days: 5 | ||
|
|
||
| - name: Upload results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6 | ||
| with: | ||
| sarif_file: results.sarif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,97 +1,197 @@ | ||
| name: Artifacts | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| tags: | ||
| - v[0-9]+.[0-9]+.[0-9]+ | ||
| pull_request: | ||
| workflow_call: | ||
| inputs: | ||
| publish: | ||
| description: Publish artifacts to the artifact store | ||
| default: false | ||
| required: false | ||
| type: boolean | ||
| secrets: | ||
| DOCKER_USERNAME: | ||
| required: true | ||
| DOCKER_PASSWORD: | ||
| required: true | ||
| outputs: | ||
| container-image-name: | ||
| description: Container image name | ||
| value: ${{ jobs.container-image.outputs.name }} | ||
| container-image-digest: | ||
| description: Container image digest | ||
| value: ${{ jobs.container-image.outputs.digest }} | ||
| container-image-ref: | ||
| description: Container image ref | ||
| value: ${{ jobs.container-image.outputs.ref }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| container-images: | ||
| name: Container images | ||
| container-image: | ||
| name: Container image | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| variant: | ||
| - alpine | ||
| - distroless | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
| security-events: write | ||
|
|
||
| outputs: | ||
| name: ${{ steps.image-name.outputs.value }} | ||
| digest: ${{ steps.build.outputs.digest }} | ||
| ref: ${{ steps.image-ref.outputs.value }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matrix job outputs are non-deterministic across variantsMedium Severity The |
||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| - name: Checkout repository | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@0d103c3126aa41d772a8362f6aa67afac040f80c # v3.1.0 | ||
|
|
||
| - name: Set up Syft | ||
| uses: anchore/sbom-action/download-syft@9fece9e20048ca9590af301449208b2b8861333b # v0.15.9 | ||
|
|
||
| - name: Install cosign | ||
| uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 | ||
| with: | ||
| cosign-release: 'v2.2.1' | ||
|
|
||
| - name: Gather metadata | ||
| - name: Set image name | ||
| id: image-name | ||
| run: echo "value=ghcr.io/${{ github.repository }}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Gather build metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v4 | ||
| uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | ||
| with: | ||
| images: | | ||
| ghcr.io/dexidp/dex | ||
| ${{ steps.image-name.outputs.value }} | ||
| dexidp/dex | ||
| flavor: | | ||
| latest = false | ||
| tags: | | ||
| type=ref,event=branch,enable=${{ matrix.variant == 'alpine' }} | ||
| type=ref,event=pr,enable=${{ matrix.variant == 'alpine' }} | ||
| type=ref,event=pr,prefix=pr-,enable=${{ matrix.variant == 'alpine' }} | ||
| type=semver,pattern={{raw}},enable=${{ matrix.variant == 'alpine' }} | ||
| type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && matrix.variant == 'alpine' }} | ||
| type=raw,value=latest,enable=${{ github.ref_name == github.event.repository.default_branch && matrix.variant == 'alpine' }} | ||
| type=ref,event=branch,suffix=-${{ matrix.variant }} | ||
| type=ref,event=pr,suffix=-${{ matrix.variant }} | ||
| type=ref,event=pr,prefix=pr-,suffix=-${{ matrix.variant }} | ||
| type=semver,pattern={{raw}},suffix=-${{ matrix.variant }} | ||
| type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }},suffix=-${{ matrix.variant }} | ||
| type=raw,value=latest,enable={{is_default_branch}},suffix=-${{ matrix.variant }} | ||
| labels: | | ||
| org.opencontainers.image.documentation=https://dexidp.io/docs/ | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v2 | ||
| # Multiple exporters are not supported yet | ||
| # See https://github.com/moby/buildkit/pull/2760 | ||
| - name: Determine build output | ||
| uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1 | ||
| id: build-output | ||
| with: | ||
| platforms: all | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
| cond: ${{ inputs.publish }} | ||
| if_true: type=image,push=true | ||
| if_false: type=oci,dest=image.tar | ||
|
|
||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v2 | ||
| uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ github.token }} | ||
| if: github.event_name == 'push' | ||
| if: inputs.publish | ||
|
|
||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v2 | ||
| uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| if: github.event_name == 'push' | ||
| if: inputs.publish | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v3 | ||
| - name: Build and push image | ||
| id: build | ||
| uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e # v5.2.0 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le | ||
| # cache-from: type=gha | ||
| # cache-to: type=gha,mode=max | ||
| push: ${{ github.event_name == 'push' }} | ||
| platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| build-args: | | ||
| BASE_IMAGE=${{ matrix.variant }} | ||
| VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} | ||
| COMMIT_HASH=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} | ||
| BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| # cache-from: type=gha | ||
| # cache-to: type=gha,mode=max | ||
| outputs: ${{ steps.build-output.outputs.value }} | ||
| # push: ${{ inputs.publish }} | ||
|
|
||
| - name: Sign the images with GitHub OIDC Token | ||
| run: | | ||
| cosign sign --yes ${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }} | ||
| if: inputs.publish | ||
|
|
||
| - name: Set image ref | ||
| id: image-ref | ||
| run: echo "value=${{ steps.image-name.outputs.value }}@${{ steps.build.outputs.digest }}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Fetch image | ||
| run: skopeo --insecure-policy copy docker://${{ steps.image-ref.outputs.value }} oci-archive:image.tar | ||
| if: inputs.publish | ||
|
|
||
| # Uncomment the following lines for debugging: | ||
| # - name: Upload image as artifact | ||
| # uses: actions/upload-artifact@v3 | ||
| # with: | ||
| # name: "[${{ github.job }}] OCI tarball" | ||
| # path: image.tar | ||
|
|
||
| - name: Extract OCI tarball | ||
| run: | | ||
| mkdir -p image | ||
| tar -xf image.tar -C image | ||
|
|
||
| # - name: List tags | ||
| # run: skopeo --insecure-policy list-tags oci:image | ||
| # | ||
| # # See https://github.com/anchore/syft/issues/1545 | ||
| # - name: Extract image from multi-arch image | ||
| # run: skopeo --override-os linux --override-arch amd64 --insecure-policy copy oci:image:${{ steps.image-name.outputs.value }}:${{ steps.meta.outputs.version }} docker-archive:docker.tar | ||
| # | ||
| # - name: Generate SBOM | ||
| # run: syft -o spdx-json=sbom-spdx.json docker-archive:docker.tar | ||
| # | ||
| # - name: Upload SBOM as artifact | ||
| # uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
| # with: | ||
| # name: "[${{ github.job }}] SBOM" | ||
| # path: sbom-spdx.json | ||
| # retention-days: 5 | ||
|
|
||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@0.7.1 | ||
| uses: aquasecurity/trivy-action@062f2592684a31eb3aa050cc61e7ca1451cecd3d # 0.18.0 | ||
| with: | ||
| input: image | ||
| format: sarif | ||
| output: trivy-results.sarif | ||
|
|
||
| - name: Upload Trivy scan results as artifact | ||
| uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
| with: | ||
| image-ref: "ghcr.io/dexidp/dex:${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}" | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| if: github.event_name == 'push' | ||
| name: "[${{ github.job }}] Trivy scan results" | ||
| path: trivy-results.sarif | ||
| retention-days: 5 | ||
|
|
||
| - name: Upload Trivy scan results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v2 | ||
| uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6 | ||
| with: | ||
| sarif_file: "trivy-results.sarif" | ||
| if: github.event_name == 'push' | ||
| sarif_file: trivy-results.sarif | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scorecard workflow targets
maininstead ofmasterLow Severity
The new
analysis-scorecard.yamlworkflow triggers on pushes tobranches: [ main ], but this fork's default branch ismaster(as seen inci.yaml). The scorecard push trigger will never fire. The workflow only runs on the weeklyscheduleandbranch_protection_ruleevents, which may not be the intent.