forked from gatecheckdev/gatecheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added logging for git context. Added config files for running portage…
… on gatecheck. (#5) --------- Co-authored-by: Aaron Yee <[email protected]>
- Loading branch information
Showing
6 changed files
with
238 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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,107 @@ | ||
version: "1" | ||
|
||
metadata: | ||
tags: [] # Additional metadata tags for the configuration | ||
|
||
# Grype scanner configuration (for container/dependency vulnerability scanning) | ||
grype: | ||
# Maximum allowed vulnerabilities by severity level | ||
severityLimit: | ||
critical: | ||
enabled: false # Whether to enforce critical severity limits | ||
limit: 0 # Maximum number of critical vulnerabilities allowed | ||
high: | ||
enabled: false | ||
limit: 7 | ||
medium: | ||
enabled: false | ||
limit: 0 | ||
low: | ||
enabled: false | ||
limit: 0 | ||
|
||
epssLimit: | ||
enabled: false # Whether to enforce EPSS (Exploit Prediction Scoring System) limits | ||
score: 0 # Maximum allowed EPSS score | ||
|
||
kevLimitEnabled: false # Whether to enforce Known Exploited Vulnerabilities (KEV) limits | ||
|
||
cveLimit: | ||
enabled: false # Whether to enforce specific CVE limits | ||
cves: [] # List of specific CVEs to check against | ||
|
||
epssRiskAcceptance: | ||
enabled: false # Whether to accept risks based on EPSS scores | ||
score: 0.001 # EPSS score threshold for risk acceptance | ||
|
||
cveRiskAcceptance: | ||
enabled: false # Whether to accept risks for specific CVEs | ||
cves: [] # List of accepted CVEs | ||
|
||
# CycloneDX configuration (for Software Bill of Materials scanning) | ||
cyclonedx: | ||
# Similar structure to grype configuration | ||
# Controls vulnerability limits and risk acceptance for SBOM analysis | ||
severityLimit: | ||
critical: | ||
enabled: false | ||
limit: 0 | ||
high: | ||
enabled: false | ||
limit: 0 | ||
medium: | ||
enabled: false | ||
limit: 0 | ||
low: | ||
enabled: false | ||
limit: 0 | ||
epssLimit: | ||
enabled: false | ||
score: 0 | ||
kevLimitEnabled: false | ||
cveLimit: | ||
enabled: false | ||
cves: [] | ||
epssRiskAcceptance: | ||
enabled: false | ||
score: 0 | ||
cveRiskAcceptance: | ||
enabled: false | ||
cves: [] | ||
|
||
# Semgrep configuration (for static code analysis) | ||
semgrep: | ||
# Maximum allowed findings by severity level | ||
severityLimit: | ||
error: | ||
enabled: false | ||
limit: 5 # Maximum number of error-level findings allowed | ||
warning: | ||
enabled: false | ||
limit: 0 | ||
info: | ||
enabled: false | ||
limit: 0 | ||
|
||
# Risk acceptance configuration based on impact levels | ||
impactRiskAcceptance: | ||
enabled: true # Whether to use impact-based risk acceptance | ||
high: false # Whether to accept high-impact findings | ||
medium: false # Whether to accept medium-impact findings | ||
low: true # Whether to accept low-impact findings | ||
|
||
# Gitleaks configuration (for secrets scanning) | ||
gitleaks: | ||
limitEnabled: false # Whether to enforce limits on secrets findings | ||
|
||
# Code coverage requirements | ||
coverage: | ||
lineThreshold: 0 # Minimum required line coverage percentage | ||
functionThreshold: 0 # Minimum required function coverage percentage | ||
branchThreshold: 0 # Minimum required branch coverage percentage | ||
|
||
# API configuration for submitting results | ||
api: | ||
enabled: true # Whether to submit results to API | ||
endpoint: http://localhost:5168/Build/SubmitArtifacts # API endpoint for submitting results | ||
skipVerify: true # Whether to skip SSL verification |
This file contains 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 |
---|---|---|
|
@@ -2,3 +2,5 @@ bin/ | |
dist/ | ||
book/ | ||
cover.cov | ||
artifacts/ | ||
.env.local |
This file contains 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,50 @@ | ||
# Base Configuration | ||
version: "1" | ||
imageTag: "ghcr.io/easy-up/gatecheck:latest" # The full image tag for the target container image (e.g. my-org/my-app:latest) | ||
artifactDir: "artifacts" # Directory for generated artifacts (e.g. ./artifacts) | ||
gatecheckBundleFilename: "gatecheck-bundle.tar.gz" # Filename for the gatecheck bundle (e.g. gatecheck-bundle.tar.gz) | ||
|
||
# Image Build Configuration | ||
imageBuild: | ||
enabled: false # Enable/Disable the image build pipeline (true/false) | ||
buildDir: "." # Build directory for image (e.g. ./cmd/portage) | ||
dockerfile: "Dockerfile" # Dockerfile to use (e.g. ./cmd/portage/Dockerfile) | ||
platform: "" # Target platform (e.g. linux/amd64, linux/arm64) | ||
target: "" # Target stage for multi-stage builds (e.g. build, test, publish) | ||
cacheTo: "" # Cache export location (e.g. type=local,dest=path) | ||
cacheFrom: "" # Cache import location (e.g. type=local,src=path) | ||
squashLayers: false # Whether to squash layers (true/false) | ||
args: {} # Build arguments (e.g. BUILD_ARGS=--build-arg=key=value) | ||
|
||
# Image Scan Configuration | ||
imageScan: | ||
enabled: false # Enable/Disable the image scan pipeline (true/false) | ||
syftFilename: "syft-sbom-report.json" # Filename for the syft sbom report (e.g. syft-sbom-report.json) | ||
grypeConfigFilename: "" # Filename for the grype config (e.g. grype-config.json) | ||
grypeFilename: "grype-vulnerability-report-full.json" # Filename for the grype vulnerability report (e.g. grype-vulnerability-report-full.json) | ||
clamavFilename: "clamav-virus-report.txt" # Filename for the clamav virus report (e.g. clamav-virus-report.txt) | ||
|
||
# Code Scan Configuration | ||
codeScan: | ||
enabled: true # Enable/Disable the code scan pipeline (true/false) | ||
gitleaksFilename: "gitleaks-secrets-report.json" | ||
gitleaksSrcDir: "." | ||
semgrepFilename: "semgrep-sast-report.json" # Filename for the semgrep sast report (e.g. semgrep-sast-report.json) | ||
semgrepRules: "p/default" # Semgrep rules to use (e.g. p/default) | ||
semgrepExperimental: false # Whether to use experimental semgrep rules (true/false) | ||
coverageFile: "" #"coverage/cobertura-coverage.xml" # Externally generated code coverage file | ||
semgrepSrcDir: "." # Target directory for semgrep scan (e.g. ./cmd/portage) | ||
|
||
# Image Publish Configuration | ||
imagePublish: | ||
enabled: false # Enable/Disable the image publish pipeline (true/false) | ||
bundleTag: "ghcr.io/easy-up/gatecheck:latest" # Image tag for gatecheck bundle image blob (e.g. my-org/my-app:latest) | ||
|
||
# Deploy Configuration | ||
deploy: | ||
enabled: true # Enable/Disable the deploy pipeline (true/false). When true, the .gatecheck.yml file is used, otherwise the default gatecheck config is used. | ||
gatecheckConfigFilename: ".custom-gatecheck.yml" # Filename for gatecheck config (e.g. gatecheck-config.json) | ||
submit: false # Whether to submit the artifacts to the configured API endpoint (true/false) | ||
successWebhooks: | ||
- url: "http://localhost:5168/Build/SubmitArtifacts" # Using the same endpoint from .custom-gatecheck.yml for consistency | ||
authorizationVar: "DEPLOY_WEBHOOK_AUTH_TOKEN" # Environment variable containing the auth token |
This file contains 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 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.