Skip to content

[K9VULN-14985] Ignore test directories from SCA scans#154

Merged
divyav-datadog merged 1 commit into
mainfrom
divyav-datadog/ignore-test-dirs
May 22, 2026
Merged

[K9VULN-14985] Ignore test directories from SCA scans#154
divyav-datadog merged 1 commit into
mainfrom
divyav-datadog/ignore-test-dirs

Conversation

@divyav-datadog

@divyav-datadog divyav-datadog commented May 22, 2026

Copy link
Copy Markdown
Contributor

What problem are you trying to solve?

  • The SCA scanner was picking up lockfiles inside test directories and reporting their dependencies as real vulnerabilities for this project.

  • K9VULN-14985

What is your solution?

  • Add a config file at the repo's root using the new in-app configuration file feature.
Screenshot 2026-05-22 at 8 47 29 AM Screenshot 2026-05-21 at 5 21 23 PM

Alternatives considered

  • Defining the ignores at the org-level or repo-level config in Datadog instead of in the repo file.
    • Org-level: too broad for repo-specific paths
    • Repo-level: harder to review and keep in sync with code changes
    • Repo-level (config in repo): chosen since fixture paths are an implementation detail of this repo and since this file also takes precedence over org- and repo-level Datadog configs, so these exclusions always apply.

What the reviewer should know

  • Any future fixture directories added will need to be explicitly added to code-security.datadog.yaml to be excluded from SCA scans.

@divyav-datadog
divyav-datadog requested a review from a team as a code owner May 22, 2026 13:19
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 22, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 86.21% (+0.94%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ac3e7e5 | Docs | Datadog PR Page | Give us feedback!

@cespio cespio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants