fix: unexport internal DlpPattern interface in src/dlp.ts#2437
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/5f8d913e-824a-4edf-bd02-aba4d106dfcc Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
DlpPattern interface in src/dlp.ts
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR narrows the public TypeScript API of the DLP module by making DlpPattern internal-only, which matches how the module is currently used: consumers rely on DLP_PATTERNS, not the schema type itself. That keeps an internal type out of the published package surface for a security-sensitive area without changing runtime behavior.
Changes:
- Remove
exportfromDlpPatterninsrc/dlp.ts. - Keep
DLP_PATTERNSexported and typed internally withDlpPattern. - Leave the DLP pattern data and module behavior unchanged.
Show a summary per file
| File | Description |
|---|---|
src/dlp.ts |
Reduces the module's exported type surface by making DlpPattern private while preserving the exported pattern list. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR author: Overall: PARTIAL (pre-step data missing; BYOK inference confirmed working)
|
🤖 Smoke Test Results
PR: fix: unexport internal Overall: PARTIAL — MCP ✅, but
|
|
Smoke Test Results ✅ GitHub MCP: Listed 2 merged PRs Status: PASS
|
Smoke Testrefactor: consolidate env-var forwarding in docker-manager.ts into typed arrays + loops Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Version Comparison Results
Result: ❌ Not all versions match — Python and Node.js versions differ between host and chroot environments. Go matches.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results
Overall status: PASS
|
Smoke Test: Services Connectivity
Overall: FAIL —
|
DlpPatternwas exported fromsrc/dlp.tsbut never imported anywhere else — it exists solely as the element type of the internalDLP_PATTERNSconstant. Exporting internal schema types for a security-sensitive module (DLP) unnecessarily widens the public API surface.Change
src/dlp.ts: Dropexportfrominterface DlpPattern.DLP_PATTERNSremains exported as the intended public API.