Skip to content

[SVLS-8660] ci: add Copilot instructions for PII and security review#1133

Open
litianningdatadog wants to merge 1 commit intomainfrom
tianning.li/SVLS-8660-ci-checks
Open

[SVLS-8660] ci: add Copilot instructions for PII and security review#1133
litianningdatadog wants to merge 1 commit intomainfrom
tianning.li/SVLS-8660-ci-checks

Conversation

@litianningdatadog
Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/copilot-instructions.md to guide GitHub Copilot auto-review toward security-relevant patterns on every PR
  • Instructs Copilot to flag PII in log statements (HTTP headers/bodies, user-identifiable fields, structs containing PII)
  • Instructs Copilot to flag new unsafe Rust blocks with missing invariant documentation
  • Instructs Copilot to flag silently swallowed errors in external-input/network code paths

Context

Jira: https://datadoghq.atlassian.net/browse/SVLS-8660

This is the first deliverable of the CI security scanning strategy (Approach C — phased).
Copilot auto-review is confirmed enabled for this repo, making this a zero-overhead advisory
layer at PR open/update time. Full strategy documented in .github/docs/ci-security-scanning-strategy.md.

Test plan

  • Open a PR that includes a log statement referencing an HTTP header or user field — confirm Copilot flags it in review comments
  • Open a PR with no suspicious log statements — confirm Copilot review passes cleanly

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

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 repository-level .github/copilot-instructions.md to steer GitHub Copilot’s auto-review toward security-relevant patterns (PII/secrets in logs, unsafe Rust invariants, and error handling issues).

Changes:

  • Introduces Copilot review guidance to flag potentially sensitive logging (headers/bodies/user-identifiable fields/secrets).
  • Adds instructions to flag new Rust unsafe usage and require explicit safety invariants / safe alternatives.
  • Adds instructions to flag problematic error handling patterns in external-input/network paths.

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

@litianningdatadog litianningdatadog force-pushed the tianning.li/SVLS-8660-ci-checks branch from bff65bd to a36befb Compare March 26, 2026 16:50
@litianningdatadog litianningdatadog force-pushed the tianning.li/SVLS-8660-ci-checks branch 2 times, most recently from ceb084e to 530325e Compare March 26, 2026 20:17
- Add .github/copilot-instructions.md to steer Copilot auto-review
  toward security-relevant patterns
- Flag PII in log statements: HTTP headers/bodies, user-identifiable
  fields, secrets — covering all tracing macro forms including
  unqualified info!/debug!/warn!/error! used via use tracing::{...}
- Flag new unsafe blocks with required safety invariant explanation
- Flag silently swallowed errors (.ok(), let _ = result) and
  panicking operations (.unwrap()/.expect()) in network/input paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@litianningdatadog litianningdatadog force-pushed the tianning.li/SVLS-8660-ci-checks branch from 530325e to faba926 Compare March 27, 2026 18:05
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.

2 participants