Skip to content

feat: [DGP-1824] set a targetFile fallback when TargetFileFromPlugin is empty#217

Open
bsalomon-snyk wants to merge 1 commit into
mainfrom
feat/add-target-file-fallback
Open

feat: [DGP-1824] set a targetFile fallback when TargetFileFromPlugin is empty#217
bsalomon-snyk wants to merge 1 commit into
mainfrom
feat/add-target-file-fallback

Conversation

@bsalomon-snyk

@bsalomon-snyk bsalomon-snyk commented Jun 15, 2026

Copy link
Copy Markdown

Set a targetFile fallback for pip when TargetFileFromPlugin is empty

  • fall back to normalisedTargetFile when targetFileFromPlugin is absent

  • Tests written and linted ℹ︎

  • [N/A] Documentation written ℹ︎

  • Commit history is tidy ℹ︎

What this does

For SCA Monitor we receive an empty target_file for a few environments:

  • npm/yarn/pnpm -- snyk-nodejs-lockfile-parser -- plugin metadata has no targetFile
  • python (requirements.txt / pip) -- snyk-python-plugin -- returnedTargetFile() returns undefined for the default case
  • Gradle (build.gradle) -- snyk-gradle-plugin -- explicitly returns undefined for non-.kts (BST-529 workaround)

This changes sets pip to use the normalizedTargetFile (requirements.txt). The other ecosystems have defined reasons for not doing so.

@bsalomon-snyk
bsalomon-snyk requested a review from a team as a code owner June 15, 2026 21:11
@snyk-io

snyk-io Bot commented Jun 15, 2026

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
Licenses 0 0 0 0 0 issues

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

@github-actions github-actions Bot added the feat label Jun 15, 2026
@snyk-pr-review-bot

This comment has been minimized.

@CLAassistant

CLAassistant commented Jun 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bsalomon-snyk
bsalomon-snyk force-pushed the feat/add-target-file-fallback branch from b314378 to 8bb8e50 Compare June 15, 2026 22:32
@snyk-pr-review-bot

This comment has been minimized.

…mPlugin is empty

  - fall back to normalisedTargetFile when targetFileFromPlugin is absent
@bsalomon-snyk
bsalomon-snyk force-pushed the feat/add-target-file-fallback branch from 8bb8e50 to 8584aa2 Compare June 15, 2026 22:36
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 4 relevant code sections from 4 files (average relevance: 1.00)

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants