Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/image-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ const DIGEST = 'sha256:[a-f0-9]{64}';
* Canonical pattern for a compiler-authorized image reference. Kept in sync
* with `$defs/digestPinnedImage` in the AWF configuration JSON Schema.
*/
export const DIGEST_PINNED_IMAGE_PATTERN =
const DIGEST_PINNED_IMAGE_PATTERN =
`^${REGISTRY}/${PATH_COMPONENT}(?:/${PATH_COMPONENT})*:${TAG}@${DIGEST}$`;

const DIGEST_PINNED_IMAGE = new RegExp(DIGEST_PINNED_IMAGE_PATTERN);

export function isDigestPinnedImageReference(reference: string): boolean {
function isDigestPinnedImageReference(reference: string): boolean {
if (/\s|\$|\{\{/.test(reference)) return false;
return DIGEST_PINNED_IMAGE.test(reference);
}
Expand Down
Loading