Skip to content

[Export Audit] isDigestPinnedImageReference - unused image validation export #7692

Description

@github-actions

Unused Export: isDigestPinnedImageReference

File: src/image-resolver.ts:66
Symbol: isDigestPinnedImageReference (function)
Evidence: Pre-verified with 0 external usages

Analysis

The isDigestPinnedImageReference function is exported but never imported outside its defining file. This function validates digest-pinned image references (e.g., image@sha256:...).

Verification:

grep -rw "isDigestPinnedImageReference" src/ --include="*.ts" | grep -vE "test|image-resolver.ts"
# Returns: no matches (0 usages outside defining file)

Dead Code Risk

Severity: MEDIUM (Score: 3 = unused public API)

  • API bloat: Exposed validation logic that isn't consumed increases the public API surface
  • Maintenance burden: Changes to image reference validation may need to maintain this unused function
  • Documentation gap: Exported function with no clear usage pattern or examples

Recommendation

  1. If truly unused: Remove the export keyword or remove the function entirely if it's also unused internally
  2. If used internally only: Keep as a private helper function
  3. If intended for validation utilities: Document the public API contract and add usage examples

Related Context

The function uses DIGEST_PINNED_IMAGE_PATTERN (also unused export) to validate image reference formats. Consider auditing both exports together.

Generated by API Surface & Export Audit · sonnet45 · 25.4 AIC · ⊞ 6.2K ·

  • expires on Sep 23, 2026, 9:21 AM UTC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions