Skip to content

Commit d9e0e67

Browse files
committed
wip: enabled portage code scan and debugging deployment job
1 parent 1bd52af commit d9e0e67

2 files changed

Lines changed: 50 additions & 23 deletions

File tree

.github/workflows/code-scan.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Scan gatecheck
2+
run-name: "Scan the gatecheck codebase"
3+
permissions:
4+
contents: read
5+
checks: write
6+
packages: write
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- '*main'
12+
- 'debug-*'
13+
tags: [ '*' ]
14+
pull_request:
15+
branches:
16+
- main
17+
jobs:
18+
code_scan:
19+
runs-on: ubuntu-latest
20+
name: Portage Code Scan
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Run Portage CD Scans
25+
uses: easy-up/portage-cd-actions/image-build-scan-publish/docker@debug-deploy-job

.portage.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
11
# Base Configuration
22
version: "1"
3-
imageTag: "ghcr.io/easy-up/gatecheck:latest" # The full image tag for the target container image (e.g. my-org/my-app:latest)
3+
# gatecheck doesn't have an official Dockerfile
4+
# imageTag: "ghcr.io/easy-up/gatecheck:latest" # The full image tag for the target container image (e.g. my-org/my-app:latest)
45
artifactDir: "artifacts" # Directory for generated artifacts (e.g. ./artifacts)
56
gatecheckBundleFilename: "gatecheck-bundle.tar.gz" # Filename for the gatecheck bundle (e.g. gatecheck-bundle.tar.gz)
67

7-
# Image Build Configuration
8+
# Image Build Configuration (gatecheck doesn't have an official Dockerfile)
89
imageBuild:
910
enabled: false # Enable/Disable the image build pipeline (true/false)
10-
buildDir: "." # Build directory for image (e.g. ./cmd/portage)
11+
buildDir: "." # Build directory for image (e.g. ./cmd/portage)
1112
dockerfile: "Dockerfile" # Dockerfile to use (e.g. ./cmd/portage/Dockerfile)
12-
platform: "" # Target platform (e.g. linux/amd64, linux/arm64)
13-
target: "" # Target stage for multi-stage builds (e.g. build, test, publish)
14-
cacheTo: "" # Cache export location (e.g. type=local,dest=path)
15-
cacheFrom: "" # Cache import location (e.g. type=local,src=path)
16-
squashLayers: false # Whether to squash layers (true/false)
17-
args: {} # Build arguments (e.g. BUILD_ARGS=--build-arg=key=value)
13+
platform: "" # Target platform (e.g. linux/amd64, linux/arm64)
14+
target: "" # Target stage for multi-stage builds (e.g. build, test, publish)
15+
cacheTo: "" # Cache export location (e.g. type=local,dest=path)
16+
cacheFrom: "" # Cache import location (e.g. type=local,src=path)
17+
squashLayers: false # Whether to squash layers (true/false)
18+
args: {} # Build arguments (e.g. BUILD_ARGS=--build-arg=key=value)
1819

19-
# Image Scan Configuration
20+
# Image Scan Configuration (gatecheck doesn't have an official Dockerfile)
2021
imageScan:
21-
enabled: false # Enable/Disable the image scan pipeline (true/false)
22-
syftFilename: "syft-sbom-report.json" # Filename for the syft sbom report (e.g. syft-sbom-report.json)
23-
grypeConfigFilename: "" # Filename for the grype config (e.g. grype-config.json)
22+
enabled: false # Enable/Disable the image scan pipeline (true/false)
23+
syftFilename: "syft-sbom-report.json" # Filename for the syft sbom report (e.g. syft-sbom-report.json)
24+
grypeConfigFilename: "" # Filename for the grype config (e.g. grype-config.json)
2425
grypeFilename: "grype-vulnerability-report-full.json" # Filename for the grype vulnerability report (e.g. grype-vulnerability-report-full.json)
25-
clamavFilename: "clamav-virus-report.txt" # Filename for the clamav virus report (e.g. clamav-virus-report.txt)
26+
clamavFilename: "clamav-virus-report.txt" # Filename for the clamav virus report (e.g. clamav-virus-report.txt)
2627

2728
# Code Scan Configuration
2829
codeScan:
29-
enabled: true # Enable/Disable the code scan pipeline (true/false)
30+
enabled: true # Enable/Disable the code scan pipeline (true/false)
3031
gitleaksFilename: "gitleaks-secrets-report.json"
3132
gitleaksSrcDir: "."
3233
semgrepFilename: "semgrep-sast-report.json" # Filename for the semgrep sast report (e.g. semgrep-sast-report.json)
33-
semgrepRules: "p/default" # Semgrep rules to use (e.g. p/default)
34-
semgrepExperimental: false # Whether to use experimental semgrep rules (true/false)
35-
coverageFile: "" #"coverage/cobertura-coverage.xml" # Externally generated code coverage file
36-
semgrepSrcDir: "." # Target directory for semgrep scan (e.g. ./cmd/portage)
34+
semgrepRules: "p/default" # Semgrep rules to use (e.g. p/default)
35+
# This is overridden in the portage Dockerfile, but is set to false for runs on local systems
36+
# where the standard Python semgrep is installed
37+
semgrepExperimental: false # Whether to use the experimental semgrep CLI (true/false)
38+
coverageFile: "" # "coverage/cobertura-coverage.xml" # Externally generated code coverage file
39+
semgrepSrcDir: "." # Target directory for semgrep scan (e.g. ./cmd/portage)
3740

3841
# Image Publish Configuration
3942
imagePublish:
@@ -42,9 +45,8 @@ imagePublish:
4245

4346
# Deploy Configuration
4447
deploy:
45-
enabled: true # Enable/Disable the deploy pipeline (true/false). When true, the .gatecheck.yml file is used, otherwise the default gatecheck config is used.
46-
gatecheckConfigFilename: ".custom-gatecheck.yml" # Filename for gatecheck config (e.g. gatecheck-config.json)
47-
submit: false # Whether to submit the artifacts to the configured API endpoint (true/false)
48+
enabled: false # Enable/Disable the deploy pipeline (true/false). When true, the .gatecheck.yml file is used, otherwise the default gatecheck config is used.
49+
gatecheckConfigFilename: ".custom-gatecheck.yml" # Filename for gatecheck config (e.g. gatecheck-config.json)
4850
successWebhooks:
49-
- url: "http://localhost:5168/Build/SubmitArtifacts" # Using the same endpoint from .custom-gatecheck.yml for consistency
51+
- url: "https://belay-api.dev.holomuatech.online/Build/SubmitArtifacts" # Using the same endpoint from .custom-gatecheck.yml for consistency
5052
authorizationVar: "DEPLOY_WEBHOOK_AUTH_TOKEN" # Environment variable containing the auth token

0 commit comments

Comments
 (0)