forked from dotnet/eShop
-
Notifications
You must be signed in to change notification settings - Fork 0
Add Zizmor support and GitSign verification #40
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4899878
Configure Renovate (#1)
renovate[bot] 001fff8
chore(deps): add semantic commit scope and clean up schedule and pack…
Pinguladora 3cd7dbb
Merge branch 'main' into develop
Pinguladora 6a8f3b0
chore(deps): update dependency node to v22 (#3)
renovate[bot] 0eb6ac2
Reconfigure renovate (#6)
Pinguladora 3a35742
chore(deps): update actions/checkout action to v5 (#19)
renovate[bot] b19d127
chore(deps): add lockfile to all projects (#28)
Pinguladora a323647
feat(build): add pre-commit framework support (#30)
Pinguladora afdd304
feat(build): add devcontainer support (#29)
Pinguladora 11eb508
feat(workflows): add GitHub Actions security analysis with zizmor
dc2c0c2
feat(build): add pre-commit hook for Renovate (#38)
Pinguladora 56fd0e6
Feature/#37-gitsign-verification (#39)
Pinguladora 531c03a
chore(deps): adjust renovate config
44d9458
fix(playwright): update webServer configuration to use port instead o…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Copyright 2022 Chainguard, Inc. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| spec: | ||
| authorities: | ||
| - keyless: | ||
| url: https://fulcio.sigstore.dev | ||
| identities: | ||
| - subjectRegExp: .+@gmail.com$ # Allow commits signed with Gmail accounts, not ideal, for testing purposes only. | ||
| issuer: https://github.com/login/oauth | ||
| ctlog: | ||
| url: https://rekor.sigstore.dev | ||
| - key: | ||
| # Allow commits signed by GitHub. | ||
| kms: https://github.com/web-flow.gpg |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| // For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
| // README at: https://github.com/devcontainers/templates/tree/main/src/dotnet | ||
| { | ||
| "name": ".NET Aspire", | ||
| // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
| "image": "mcr.microsoft.com/devcontainers/dotnet:dev-10.0-noble@sha256:3920807c7304921773b67d3a76bbff5c5d0f3727bea2f014c29d395c41977a08", | ||
| // From https://containers.dev/features | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/powershell:1": {}, | ||
| // Testing | ||
| "ghcr.io/devcontainers-extra/features/k6:1": {}, | ||
| // Tunneling | ||
| "ghcr.io/stuartleeks/dev-container-features/dev-tunnels:0": {}, | ||
| // Signing | ||
| "ghcr.io/devcontainers-extra/features/cosign:1": {}, | ||
| "ghcr.io/devcontainers-extra/features/gitsign:1": {}, | ||
| "ghcr.io/devcontainers-extra/features/gitsign-credential-cache:1": {}, | ||
| // Git hooks | ||
| "ghcr.io/devcontainers-extra/features/pre-commit:2": {}, | ||
| "ghcr.io/dhoeric/features/trivy:1": {}, | ||
| "ghcr.io/devcontainers-extra/features/upx:1": {}, | ||
| // Containers and Orchestration | ||
| "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}, | ||
| "ghcr.io/devcontainers-extra/features/argo-cd:1": {}, | ||
| "ghcr.io/prom3theu5/aspirational-manifests/aspirate:latest": {}, | ||
| "ghcr.io/devcontainers-extra/features/dive:1": {}, | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
| "version": "latest", | ||
| "enableNonRootDocker": true, | ||
| "moby": true | ||
| }, | ||
| // Package managers | ||
| "ghcr.io/devcontainers-extra/features/mise:1": {}, | ||
| "ghcr.io/devcontainers/features/node:1": { | ||
| "version": "lts" | ||
| } | ||
| }, | ||
|
|
||
| "hostRequirements": { | ||
| "cpus": 4, | ||
| "memory": "16gb", | ||
| "storage": "64gb" | ||
| }, | ||
|
|
||
| // Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
| // "forwardPorts": [5000, 5001], | ||
| // "portsAttributes": { | ||
| // "5001": { | ||
| // "protocol": "https" | ||
| // } | ||
| // } | ||
|
|
||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| // "postCreateCommand": "dotnet restore", | ||
| // This is somewhat dangerous | ||
| "onCreateCommand": "curl -sSL https://aspire.dev/install.sh | bash", | ||
| "postStartCommand": "dotnet dev-certs https --trust", | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "redhat.vscode-yaml", | ||
| "GitHub.copilot-chat", | ||
| "GitHub.copilot" | ||
| ] | ||
| } | ||
| }, | ||
| // Configure tool-specific properties. | ||
| // "customizations": {}, | ||
| // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
| // "remoteUser": "root" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Verify Commit | ||
| description: This action verifies the PR commit using Gitsign. | ||
| on: [pull_request] | ||
|
|
||
| concurrency: | ||
| group: gitsign-verify | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| name: Verify commit | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - uses: chainguard-dev/actions/setup-gitsign@0cda751b114eb55c388e88f7479292668165602a # v1.0.2 | ||
| - shell: bash | ||
| run: | | ||
| gitsign verify --certificate-identity-regexp="^.*@gmail.com$" --certificate-oidc-issuer="https://github.com/login/oauth" |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: GitHub Actions Security Analysis with zizmor 🌈 | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["**"] | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: zizmor-security-scan | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| name: Run zizmor 🌈 | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write # write permission to create security alerts | ||
| # contents: read # only needed for private repos | ||
| # actions: read # only needed for private repos | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor 🌈 | ||
| uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| rules: | ||
| unpinned-uses: | ||
| config: | ||
| policies: | ||
| "*": hash-pin |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| default_stages: | ||
| - "pre-commit" | ||
| default_install_hook_types: | ||
| - "pre-commit" | ||
| - "commit-msg" | ||
| - "pre-push" | ||
| - "post-checkout" | ||
| - "post-merge" | ||
|
|
||
| fail_fast: true | ||
|
|
||
| repos: | ||
| ############################################################################ | ||
| # COMMIT MESSAGE TOOLS | ||
| ############################################################################ | ||
| - repo: local | ||
| hooks: | ||
| - id: cocogitto-commit-msg | ||
| name: Cocogitto verify | ||
| language: system | ||
| entry: "cog" | ||
| args: ["verify", "--file"] | ||
| stages: [commit-msg] | ||
| pass_filenames: true | ||
| ############################################################################ | ||
| # SAST & SCA SCANNING TOOLS | ||
| ############################################################################ | ||
| - repo: https://github.com/gitleaks/gitleaks | ||
| rev: v8.28.0 | ||
| hooks: | ||
| - id: gitleaks | ||
| name: Gitleaks secret detection | ||
| description: Scan for secrets using gitleaks. | ||
| args: ["--staged","--redact", "--no-banner", "--platform", "github", "--verbose"] | ||
| stages: ["pre-commit"] | ||
| - repo: local | ||
| hooks: | ||
| - id: trivy | ||
| name: Trivy | ||
| description: Vulnerability and license scan with Trivy | ||
| language: system | ||
| entry: trivy | ||
| args: ["repo", "--scanners", "vuln,license", "--severity", "CRITICAL", "--quiet", "--exit-code", "1", "--disable-telemetry", "."] | ||
| pass_filenames: false | ||
| stages: ["pre-commit"] | ||
| - repo: https://github.com/renovatebot/pre-commit-hooks | ||
| rev: 41.158.2 | ||
| hooks: | ||
| - id: renovate-config-validator | ||
| args: [--strict] | ||
| stages: ["pre-push"] | ||
| ############################################################################ | ||
| # IMAGE COMPRESSION TOOLS | ||
| ############################################################################ | ||
| - repo: https://github.com/oxipng/oxipng | ||
| rev: v9.1.5 | ||
| hooks: | ||
| - id: oxipng | ||
| name: Oxipng compression | ||
| description: Visually lossless optimization of PNG files. | ||
| args: ["-o", "4", "--strip", "safe", "--alpha"] | ||
| pass_filenames: true | ||
| types: [png] | ||
| stages: ["pre-push"] |
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / zizmor
credential persistence through GitHub Actions artifacts Warning