Skip to content

vex: allow FixedInVersion rewrite via CEL - #1975

Draft
crozzy wants to merge 1 commit into
quay:mainfrom
crozzy:vex-fixed-in-version
Draft

vex: allow FixedInVersion rewrite via CEL#1975
crozzy wants to merge 1 commit into
quay:mainfrom
crozzy:vex-fixed-in-version

Conversation

@crozzy

@crozzy crozzy commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This patch allows callers to rewrite FixedInVersions with a CEL expression. Expressions have access to all the PURL data with everything in a StringType except for the qualifiers which are MapType.

Comment thread rhel/vex/fixed_in_cel.go Outdated
return ""
}
sum := sha256.Sum256([]byte(expr))
return hex.EncodeToString(sum[:8])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why truncate the shasum?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

64 bits / 8 bytes seemed enough to signal the expression had changed and for something that is non-security related but full sha-256 is also fine, I can change that

This patch allows callers to rewrite FixedInVersions with a CEL
expression. Expressions have access to all the PURL data with everything
in a StringType except for the qualifiers which are MapType.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
@crozzy
crozzy force-pushed the vex-fixed-in-version branch from 94fee35 to 8af3812 Compare August 6, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants