Skip to content

Control 0075 - Image pull policy on latest tag triggers randomly #351

Open
@gnd

Description

@gnd

Description

The C-0075 control treats all tags without numbers as latest. This is specified in the description of the control: https://hub.armosec.io/docs/c-0075:

Note as well that some vendors don't use the word latest in the tag. Some other word may also behave like the latest. For example, Redis uses redis:alpine to signify the latest. Therefore, this control treats any word that does not contain digits as the latest. 

Sometimes it happens that the hash function assigning tags at build (eg. $CI_COMMIT_SHORT_SHA) returns a hash without any numbers. This control then triggers a false positive. We would prefer if this check would only scan for lates tag and not do any magical assumptions about the nature of tag with or without numbers.

Environment

OS: Ubuntu 22.04 LTS
Version: built latest master

Steps To Reproduce

  1. Deploy a deployment tagged with only letters such as befacaad which is an actual hash.
  2. Scan with Kubescape

Expected behavior

Kubescape should not return this as a failed control.

Actual Behavior

Kubescape does return a failed control C-0075 for image tags which don't contain numbers. This can happen randomly. We can disable this control, but then we would loose the possibility to check for actual latest tags. It would be best if the "only letters" rule would be deactivated as it will trigger random false positives/

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    • Status

      Feature

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions