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

Image references mutated even when mode is set to insecureValidateOnly #1816

Closed
PranavBhatSF opened this issue Nov 10, 2024 · 2 comments
Closed

Comments

@PranavBhatSF
Copy link
Contributor

PranavBhatSF commented Nov 10, 2024

Describe the bug

Image references in the pod definition is mutated and the digests are included even when with.mode is set to insecureValidateOnly in the policies.

Below is the extract from connaisseur-app-config configmap.

data:
  config.yaml: |
    validators:
    -
      name: default
      trustRoots:
      - key: |
          <KEY>
        name: default
      type: cosign
    policy:
    -
      pattern: '*:*'
      validator: default
      with:
        mode: insecureValidateOnly
        verifyInTransparencyLog: false

Logs in the Connaisseur pod

{
  "level": "info",
  "msg": "successfully validated image customacr.azurecr.io/stakater/reloader:v1.0.95 using rule *:* and validator default. Result is customacr.azurecr.io/stakater/reloader:v1.0.95@sha256:5e15985882a8312abe5281aaae61301089244d5a33470eba16a7aeca715340c9.",
  "time": "2024-11-10T15:28:24Z"
}

This is just an example. Same issue is happening with all the images.

Expected behavior

Only the validation should happen and the image references should not be mutated.

Optional: To reproduce

Deployment with the above config should reproduce the issue

Optional: Versions (please complete the following information as relevant):

  • OS: Redhat8.6
  • Kubernetes Cluster: RKE2 (1.30.5)
  • Container registry: Azure Container Registry
  • Connaisseur: v3.7.0

Optional: Additional context

This causes applications as OutOfSync in Argocd. Is any additional configuration needed to do only validation?

phbelitz added a commit that referenced this issue Nov 15, 2024
The check on the validation mode is done by lower casing the input and comparing it to a constant. Unfortunately the constant wasn\'t entirely lower case. This has been fixed.

fixes #1816
phbelitz added a commit that referenced this issue Nov 15, 2024
The check on the validation mode is done by lower casing the input and comparing it to a constant. Unfortunately the constant wasn\'t entirely lower case. This has been fixed.

fixes #1816
@PranavBhatSF
Copy link
Contributor Author

Hi @phbelitz
Thanks for the fix. When would this change get published?

@phbelitz
Copy link
Member

will probably happen this friday.

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

No branches or pull requests

2 participants