Skip to content

Add OCSF DNS Activity normalization to coredns pipeline#23726

Merged
jbfeldman-dd merged 4 commits into
masterfrom
jonah.feldman/coredns-ocsf
May 18, 2026
Merged

Add OCSF DNS Activity normalization to coredns pipeline#23726
jbfeldman-dd merged 4 commits into
masterfrom
jonah.feldman/coredns-ocsf

Conversation

@jbfeldman-dd

@jbfeldman-dd jbfeldman-dd commented May 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Maps CoreDNS query/response logs to OCSF DNS Activity [4003]. Adds:

  • A single-class OCSF sub pipeline for class DNS Activity [4003] with metadata string-builders, an arithmetic-processor that converts duration (ns) → ocsf.response_time (ms), and a schema-processor with category-mappers for activity_id, connection_info.direction_id, severity_id, status_id, and rcode_id (covers all 23 OCSF rcode enum values), plus direct remappers for time, endpoint, query, and protocol fields.
  • Generated expected OCSF blocks in coredns_tests.yaml.

Motivation

Bring CoreDNS into the OCSF normalization effort so Cloud SIEM detections and dashboards that key off ocsf.* apply to CoreDNS DNS logs alongside other DNS sources (e.g., BlueCat Integrity, Cisco Umbrella DNS).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

🤖 Generated with Claude Code

Map CoreDNS query/response logs to OCSF DNS Activity [4003]. Adds OCSF
facets, a single-class sub-pipeline (no pre-transformation), and the
generated expected OCSF blocks in the test fixtures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jbfeldman-dd jbfeldman-dd added the qa/skip-qa Automatically skip this PR for the next QA label May 18, 2026
jbfeldman-dd added a commit that referenced this pull request May 18, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jbfeldman-dd jbfeldman-dd force-pushed the jonah.feldman/coredns-ocsf branch from ce7db38 to 4757882 Compare May 18, 2026 14:52
jbfeldman-dd and others added 2 commits May 18, 2026 11:04
validate-logs flagged five OCSF facet path conflicts. Rename to the
canonical form used by the existing DNS integrations and add the
`type: integer` annotation expected on `ocsf.rcode_id` and
`ocsf.src_endpoint.port`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
validate-logs asks for `facetType: range` on this facet path. Match the
form CI's canonical-suggestion message printed for ocsf.src_endpoint.port.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jbfeldman-dd jbfeldman-dd marked this pull request as ready for review May 18, 2026 16:35
@jbfeldman-dd jbfeldman-dd requested a review from a team as a code owner May 18, 2026 16:35
@jbfeldman-dd

Copy link
Copy Markdown
Contributor Author

OCSF Validations pass, except on logs that have no timestamp.

image

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7d0144feb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread coredns/assets/logs/coredns.yaml

@cepolation-datadog cepolation-datadog 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.

Doesn't make sense to have fallbacks without values imo but non-blocking so approving.

Comment thread coredns/assets/logs/coredns.yaml Outdated
Comment on lines +232 to +234
fallback:
values: {}
sources: {}

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.

Why have fallback section if empty anyways?

Comment thread coredns/assets/logs/coredns.yaml Outdated
Comment on lines +245 to +247
fallback:
values: {}
sources: {}

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.

same as above

Comment thread coredns/assets/logs/coredns.yaml Outdated
Comment on lines +295 to +297
fallback:
values: {}
sources: {}

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.

same as above

@temporal-github-worker-1 temporal-github-worker-1 Bot dismissed cepolation-datadog’s stale review May 18, 2026 17:30

Review from cepolation-datadog is dismissed. Related teams and files:

  • logs-integrations-reviewers
    • coredns/assets/logs/coredns.yaml
@dd-octo-sts

dd-octo-sts Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 20 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and Codecov settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@jbfeldman-dd jbfeldman-dd added this pull request to the merge queue May 18, 2026
Merged via the queue into master with commit 5ee80d2 May 18, 2026
53 checks passed
@jbfeldman-dd jbfeldman-dd deleted the jonah.feldman/coredns-ocsf branch May 18, 2026 18:56
@dd-octo-sts dd-octo-sts Bot added this to the 7.81.0 milestone May 18, 2026
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