Skip to content

[K9VULN-11777] Add summarized legacy config doc#856

Merged
jasonforal merged 1 commit intomainfrom
jf/K9VULN-11777-1
Mar 19, 2026
Merged

[K9VULN-11777] Add summarized legacy config doc#856
jasonforal merged 1 commit intomainfrom
jf/K9VULN-11777-1

Conversation

@jasonforal
Copy link
Collaborator

Takes the current README.md and extracts it into a separate doc.

This will be linked to by #852

@jasonforal jasonforal requested a review from a team as a code owner March 19, 2026 21:49
Copilot AI review requested due to automatic review settings March 19, 2026 21:49
Copy link

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

Adds a standalone documentation page capturing the legacy static-analysis.datadog.{yml,yaml} configuration format so it can be referenced externally while the project transitions to the newer config schema.

Changes:

  • Added doc/legacy_config.md describing the legacy configuration file schema and semantics.
  • Included annotated YAML examples demonstrating legacy ruleset/rule configuration and path filtering.

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

- `rulesets`: (required) a list with all the rulesets to use for this repository (see [Datadog Documentation](https://docs.datadoghq.com/security/code_security/static_analysis/static_analysis_rules/) for a full list). The elements of this list must be strings or maps containing a configuration for a ruleset (described below.)
- `ignore`: (optional) a list of path prefixes and glob patterns to ignore. A file that matches any of its entries will not be analyzed.
- `only`: (optional) a list of path prefixes and glob patterns to analyze. If `only` is specified, only files that match one of its entries will be analyzed.
- `ignore-gitignore`: (optional) by default, any entries found in the `.gitignore` file are added to the `ignore` list. If the `ignore-gitignore` option is true, the `.gitignore` file is not read.
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

The legacy schema reference omits the ignore-generated-files top-level option, but the legacy config parser supports it (kebab-case field ignore_generated_files). This doc should list the option (and its default behavior) so users can discover how to include generated files when needed.

Suggested change
- `ignore-gitignore`: (optional) by default, any entries found in the `.gitignore` file are added to the `ignore` list. If the `ignore-gitignore` option is true, the `.gitignore` file is not read.
- `ignore-gitignore`: (optional) by default, any entries found in the `.gitignore` file are added to the `ignore` list. If the `ignore-gitignore` option is true, the `.gitignore` file is not read.
- `ignore-generated-files`: (optional) by default, generated files are ignored and not analyzed. If the `ignore-generated-files` option is false, generated files will be included in the analysis.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,131 @@
# Legacy Configuration File
The static analyzer has backwards-compatible support for the legacy `static-analysis.datadog.yml` configuration file,
which has a different schema and semantics than the current configuration schema (See: [Configuration file](https://github.com/DataDog/datadog-static-analyzer?tab=readme-ov-file#configuration-file)).
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

The link to the current configuration schema uses a GitHub UI-specific query string (?tab=readme-ov-file), which is brittle and may not work in non-GitHub renderers. Prefer a repo-relative Markdown link to the relevant doc/section (e.g., README section anchor) so the reference remains stable.

Suggested change
which has a different schema and semantics than the current configuration schema (See: [Configuration file](https://github.com/DataDog/datadog-static-analyzer?tab=readme-ov-file#configuration-file)).
which has a different schema and semantics than the current configuration schema (See: [Configuration file](../README.md#configuration-file)).

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +6
The static analyzer has backwards-compatible support for the legacy `static-analysis.datadog.yml` configuration file,
which has a different schema and semantics than the current configuration schema (See: [Configuration file](https://github.com/DataDog/datadog-static-analyzer?tab=readme-ov-file#configuration-file)).

Users may continue to use their `static-analysis.datadog.yml` configuration file with no disruptions or behavior
changes. A migration tool will be provided in the future.
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

This doc refers to the legacy config as static-analysis.datadog.yml, but the CLI loader accepts both .yml and .yaml extensions for the legacy config basename. Consider documenting both supported filenames to avoid confusing users who already use the .yaml variant.

Copilot uses AI. Check for mistakes.
@datadog-datadog-prod-us1

This comment has been minimized.

@jasonforal jasonforal merged commit 67491f7 into main Mar 19, 2026
90 of 92 checks passed
@jasonforal jasonforal deleted the jf/K9VULN-11777-1 branch March 19, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants