← Back to Pull requests

[PAR] Restrict executor IPC endpoint permissions and stop logging action failure messages #58498

Closed
unknown closed this pull request without merging on Oct 21, 2026 15:33 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 17:22 UTC
Author

<!-- dd-meta {"pullId":"b7edfdd0-b326-4f6d-b23b-edffc4a1dbdb","source":"chat","resourceId":"8b96e5bc-33f5-4029-a412-d1a52dddfb5e","workflowId":"d7962eb3-4c24-4315-9b02-bb47b2b978a4","codeChangeId":"d7962eb3-4c24-4315-9b02-bb47b2b978a4","sourceType":"chat"} -->
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?

Hardens the Private Action Runner's local IPC and failure logging:

  • Unix executor socket is created with mode 0600, regardless of umask. It is bound in a private 0700 staging directory and renamed into place, so it is never briefly exposed. Setup failures close the listener and return an error.

  • Windows executor pipe gets an explicit, protected DACL: Local System and Administrators (full), the pipe owner (server), and the Agent service account (client). The executor refuses to listen if it cannot resolve the account.

  • Failed actions are logged with task ID and error code only, in both par-control and the monolithic runner. The error text still goes to OPMS.
  • Motivation

    Security review findings for the PAR executor:

  • The socket's access depended on the umask.

  • The pipe used go-winio's default DACL.

  • Raw action error text, which can contain credentials, was logged at INFO/WARN.
  • Describe how you validated your changes

  • Unit tests cover socket mode, stale-socket handling, fail-closed setup, the pipe DACL contents, account resolution, and that no failure message reaches any log level. They pass on Linux and Windows.

  • Cross-user denial, Linux: run as root, nobody gets EACCES connecting to the socket. Setting the mode to 0666 makes the test fail, so it catches a regression.

  • Windows e2e: new TestExecutorPipeAdmitsOnlyIntendedAccounts in TestWindowsPARSplitLifecycleSuite. It checks that the live pipe:

  • - is owned by the non-admin Agent account;
    - has exactly the intended DACL;
    - denies an unrelated local user.

    TestExecutorStartsForSignedWork confirms par-control still connects and runs a signed action. The whole suite passes.

    Diff: 284 lines (+213 / -71) across 3 files Reviewer: dd-gplassard Review duration: 1330m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 284 lines diff across 3 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #58498"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62.9% (MEDIUM) · Higher = larger blast radius
    62.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.9% · Safe to merge
    24.9%