Skip to content

Add CEL autocomplete for package metadata hashes and has_package_artifact_hash_mismatch function#1573

Merged
nscuro merged 1 commit into
DependencyTrack:mainfrom
nscuro:component-hash-mismatch-policy
Jun 4, 2026
Merged

Add CEL autocomplete for package metadata hashes and has_package_artifact_hash_mismatch function#1573
nscuro merged 1 commit into
DependencyTrack:mainfrom
nscuro:component-hash-mismatch-policy

Conversation

@nscuro
Copy link
Copy Markdown
Member

@nscuro nscuro commented Jun 4, 2026

Description

Adds CEL autocomplete for package metadata hashes and has_package_artifact_hash_mismatch function.

Addressed Issue

N/A

Additional Details

API server PR: DependencyTrack/dependency-track#6266
Docs PR: DependencyTrack/docs#128

Checklist

…fact_hash_mismatch function

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro added this to the 5.0 milestone Jun 4, 2026
Copilot AI review requested due to automatic review settings June 4, 2026 19:25
@nscuro nscuro added the enhancement New feature or request label Jun 4, 2026
@owasp-dt-bot
Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CEL (Common Expression Language) editor autocomplete metadata for policy expressions by exposing newly added component fields for upstream-reported package artifact hashes and a new CEL member function that detects hash mismatches.

Changes:

  • Added package_artifact_{md5,sha1,sha256,sha512} fields to the Component type completions.
  • Added component.has_package_artifact_hash_mismatch() to the Component method completions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nscuro nscuro merged commit 6be89ba into DependencyTrack:main Jun 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants