Integrate SLSA Level 3 provenance, isolated container builds, and code coverage reporting - #2839
Integrate SLSA Level 3 provenance, isolated container builds, and code coverage reporting#2839asmit27rai wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2839 +/- ##
=======================================
+ Coverage 0 4.18% +4.18%
=======================================
Files 0 63 +63
Lines 0 15420 +15420
=======================================
+ Hits 0 646 +646
- Misses 0 14709 +14709
- Partials 0 65 +65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…overage Signed-off-by: asmit27rai <raiasmit10@gmail.com>
| verify: | ||
| name: Verify SLSA Provenance | ||
| if: github.repository == 'kubearmor/kubearmor' | ||
| runs-on: ubuntu-22.04 |
| WORKDIR /usr/src/KubeArmor | ||
|
|
||
| COPY KubeArmor/go.mod KubeArmor/go.sum ./KubeArmor/ | ||
| COPY pkg/ ./pkg/ |
There was a problem hiding this comment.
why are we copying pkg directory?
There was a problem hiding this comment.
In kubearmor/go.mod, there is local replacement replace github.com/kubearmor/KubeArmor/pkg/KubeArmorController => ../pkg/KubeArmorController
In dependency caching step go mod download and go mod verify validate all module replacements.
COPY pkg/ ./pkg/ is needed so Go can resolve the local relative path without throwing a missing error
Signed-off-by: asmit27rai <raiasmit10@gmail.com>
…OpenSSF Silver badge Signed-off-by: asmit27rai <raiasmit10@gmail.com>
Description
This PR addresses the supply-chain security and CII Best Practices criteria on the LFX security checklist:
SLSA Level 3 Provenance Generation:
slsa-framework/slsa-github-generatorreusable workflow into.github/workflows/ci-latest-release.yml..intoto.jsonlattestation provenance files and uploads them as release assets alongside container & binary releases.Network-Isolated Container Compilation:
Dockerfileandpkg/KubeArmorController/Dockerfileto copygo.mod/go.sumand rungo mod download && go mod verifyprior to copying full source code.GOPROXY=offduringmakeandgo buildsteps to guarantee zero outbound network calls during compilation.Continuous SLSA Provenance Verification:
.github/workflows/slsa-verify.ymlto automatically verify release artifacts against.intoto.jsonlattestations usingslsa-verifier verify-artifact.Code Coverage Reporting:
.github/workflows/ci-test-go.ymlto executego test -coverprofile=coverage.txt -covermode=atomic ./...and report results viacodecov/codecov-action.Badges:
README.md.