Skip to content
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

Bytt til "nais/docker-build-push"-action #259

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

slovrid
Copy link
Contributor

@slovrid slovrid commented Jan 18, 2024

Bytter fra docker/build-push-action GitHub action til å bruke NAIS sin nais/docker-build-push GitHub action. Dette gir oss en del fordeler blant annet mtp. stabilitet ved image-pulls da nais/docker-build-push går mot Google Artifact Registry (GAR) i stedet for GitHub Container Registry (GHCR), samt automatisk signering/scanning av Docker images via SALSA.

Det står en god del om dette i NAIS-docen, bla.a. Salsa - NAIS og OCI registry migration - NAIS. Noen relevante utdrag:

SLSA is short for Supply chain Levels for Software Artifacts pronounced salsa.

It is a security framework, essentially a checklist comprising standards and controls aimed at preventing tampering, enhancing integrity, and securing both packages and infrastructure within our projects.

If you utilize the nais/docker-build-push action for building and pushing your container image, you will automatically receive a signed attestation/SBOM (Software Bill of Materials) for your container image and its dependencies.

This SBOM will be uploaded to your container registry along with your image. The attestation is generated by the Trivy GitHub action and signed using cosign.

Upon deploying your image to NAIS, the attestation will undergo verification by the NAIS platform (picante) and will be uploaded to an SBOM analysis platform known as Dependency-Track. In Dependency-Track, you can examine the attestation as well as the vulnerabilities present in your image and its dependencies.

GHCR serves as a OCI registry hosted by GitHub, but it has certain limitations, such as imposing strict rate limits on the number of requests. We've encountered challenges with these rate limits, particularly when upgrading a cluster or restoring from a backup. In such instances, we've had to patiently wait for the rate limits to reset before deploying / restoring our applications.

On the other hand, GAR is a OCI registry hosted by Google, and we find it to be a more favorable solution for our needs. Additionally, as we transition to the cloud, the seamless integration with the Google Cloud Platform further enhances its appeal as a beneficial option for our operations.

Trello ticket number and link

@slovrid slovrid requested a review from a team as a code owner January 18, 2024 11:36
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@slovrid slovrid merged commit 3981737 into dev Jan 22, 2024
6 checks passed
@slovrid slovrid deleted the docker-build-push-og-salsa branch January 22, 2024 12:40
@slovrid
Copy link
Contributor Author

slovrid commented Jan 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant