Conversation
📝 WalkthroughWalkthroughThe Priority: ⬇️ Low Merge Risk: 🟡 Moderate · up to The direct registry scan can fail operationally or on policy checks without blocking image publication, allowing releases to proceed without a completed security scan. Failure handling should be narrowed before merge. Comment |
| REGISTRY_AUTH="$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')" | ||
| - > | ||
| jq -n --arg registry "$CI_REGISTRY" --arg auth "$REGISTRY_AUTH" | ||
| '{auths: {($registry): {auth: $auth}}}' > "$HOME/.docker/config.json" |
There was a problem hiding this comment.
Lets do chmod 600 "$HOME/.docker/config.json" after writing it.
There was a problem hiding this comment.
Updated to include chmod 600 "$HOME/.docker/config.json"
Signed-off-by: Arjun <agadiyar@nvidia.com>
|
Overall, the change looks good to me. I am wondering if we should now mark this scan job a hard requirement for pipeline runs than a soft requirement like it was before. Adding it as a hard requirement will mean more steps to manually fix those failures whenever releasing, but just want to double check. @tariq1890 thoughts on this? |
On most of the other repos the scan job is a hard requirement already. I'm not sure what the initial thinking was for not having that for the gpu operator, but making it a hard req would align with the other repos. |
Description
This PR is created in response to the following breaking pipeline changes:
This change will use the cli invocation to fix this:
pulse-cli -n "${NSPECT_ID}" scan-image -i "${CONTAINER_IMAGE}" --platform "${PLATFORM}" -p "${CONTAINER_POLICY}" --output-dir="scan-results" -oThis change will replace docker login + docker pull + docker save with registry-based scanning via a $HOME/.docker/config.json and an exported REGISTRY_AUTH_FILE, and disables the inherited docker:dind sidecar with services: []
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
Tested on Gitlab. Verified pipeline scan job is running now.