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

support GitLab's !reference tags #6711

Open
elchenberg opened this issue Sep 9, 2024 · 0 comments
Open

support GitLab's !reference tags #6711

elchenberg opened this issue Sep 9, 2024 · 0 comments
Labels
contribution requested This is a great feature idea, but we will need a contribution to get it added to Checkov.

Comments

@elchenberg
Copy link

Describe the feature

Currently (v3.2.249) Checkov does not seem to support GitLab's !reference tags.

https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#reference-tags

I have a .gitlab-ci.yml file and when I run Checkov I see the following warning in the output:

2024-09-09 17:05:56,984 [MainThread  ] [WARNI]  Fail to load yaml content, could not determine a constructor for the tag '!reference'
  in "<unicode string>", line 8, column 13:
              - !reference [checkov, image]
                ^

Examples

trivy:
  image: docker.io/aquasec/trivy:0.55.0@sha256:35e972d4c97895711cb2de6594cc1774b61e6b9dc7661ef73a76dd649f006c8d
  script:
    - trivy image "${IMAGE:?}"
  parallel:
    matrix:
      - IMAGE:
          - !reference [checkov, image]
          - !reference [trivy, image]

checkov:
  image: docker.io/bridgecrew/checkov:3.2.249@sha256:87a82f290af394b7432fa6858efb88c7b65785df8493567794c2ce97120ef228
  script:
    - checkov --directory .
@elchenberg elchenberg added the contribution requested This is a great feature idea, but we will need a contribution to get it added to Checkov. label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution requested This is a great feature idea, but we will need a contribution to get it added to Checkov.
Projects
None yet
Development

No branches or pull requests

1 participant