Skip to content

[DOCS-XXXXX] Add IaC Security custom rules guide - #38546

Draft
valeryjuli wants to merge 1 commit into
masterfrom
valery.neira/iac-custom-rules-guide
Draft

[DOCS-XXXXX] Add IaC Security custom rules guide#38546
valeryjuli wants to merge 1 commit into
masterfrom
valery.neira/iac-custom-rules-guide

Conversation

@valeryjuli

Copy link
Copy Markdown
Contributor

Motivation

IaC Security has a custom-rule authoring feature (Detection Coverage > IaC) with no existing documentation. This adds an overview page and a step-by-step tutorial covering the Rego rule contract (package datadog / DatadogPolicy contains result) used by both default and custom IaC rules.

Fixes DOCS-XXXXX (placeholder — replace with the real ticket before merging)

What's included

  • content/en/security/code_security/iac_security/custom_rules/_index.md: rule contract, result fields, iteration pattern, testing guidance
  • content/en/security/code_security/iac_security/custom_rules/tutorial.md: end-to-end tutorial (Terraform S3 versioning check)
  • Nav entries in config/_default/menus/main.en.yaml
  • Cross-links from iac_security/_index.md and iac_rules/_index.md

AI assistance disclosure

This content was drafted with Claude Code, grounded in verified Rego syntax/examples from the datadog-iac-scanner-default-rules repo and cross-checked against existing docs conventions (SAST custom rules pages, CSM custom rules pages). It has not yet been reviewed against the live Detection Coverage > IaC UI for exact button/field copy — see open items below.

Merge instructions

  • Merge this PR myself once it's approved

Open items before merging

  • Replace DOCS-XXXXX with a real ticket number (title + Fixes line)
  • Verify exact UI copy/navigation in the live Detection Coverage > IaC custom-rule editor and align wording
  • Confirm whether the custom-rule editor supports importing shared libraries (common_lib, etc.) — guide currently avoids claiming this
  • Run yarn start locally to preview rendering and nav placement

Test plan

  • vale passes on all new/edited files (0 errors)
  • Menu YAML validated
  • Local Hugo preview (not run — see open items)

Document the IaC Security custom-rule authoring feature: the
package datadog / DatadogPolicy Rego contract, result fields, and a
step-by-step tutorial for writing a rule from scratch. Cross-link
from the IaC Security overview and rules pages.
@github-actions github-actions Bot added the Architecture Everything related to the Doc backend label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Possible site support note detected

The following files have a site-region shortcode at the top of the page that mentions a feature being "not available" or "not supported":

  • content/en/security/code_security/iac_security/iac_rules/_index.md

Are you trying to document site support for a product? If so, the site-region shortcode is not the recommended approach. See the Documenting site support guide for the preferred method.

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

Labels

Architecture Everything related to the Doc backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant