Skip to content

feat: pam built-in masking - #403

Open
sheensantoscapadngan wants to merge 2 commits into
mainfrom
feat/pam-built-in-masking
Open

sheensantoscapadngan wants to merge 2 commits into
mainfrom
feat/pam-built-in-masking

Conversation

@sheensantoscapadngan

@sheensantoscapadngan sheensantoscapadngan commented Sep 17, 2026

Copy link
Copy Markdown
Member

Description 📣

This PR adds support for built-in PAM masking
image

image

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@infisical-review-police

Copy link
Copy Markdown

💬 Discussion in Slack: #pr-review-cli-403-feat-pam-built-in-masking

Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel.

@gitguardian

gitguardian Bot commented Sep 17, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37371478 Triggered JSON Web Token 42c1446 packages/pam/session/masking/masking_test.go View secret
37409076 Triggered Generic High Entropy Secret cf98da7 packages/pam/session/masking/masking_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 2/5

The PR is not yet safe to merge because it can both retain valid short credentials and irreversibly redact legitimate high-entropy identifiers in PAM audit recordings.

Findings

  1. P1 Security Short Credentials Remain Unmasked
  2. P1 Legitimate Identifiers Get Masked
Summary

This PR adds opt-in built-in secret detection and exact PAM credential masking to encrypted session recordings, extends the PAM policy response model, and advertises gateway support through heartbeats.

  • Introduces a shared detector built from the default rules and a PAM-specific entropy rule.
  • Chains custom regex, exact credential, and built-in masking stages.
  • Adds masking correctness, concurrency, and benchmark coverage.
  • Two masking-boundary issues remain: short credentials can escape redaction, while broad high-entropy matching can corrupt legitimate audit data.

Reviews (1) · Last reviewed commit: "feat: pam built-in masking"

Comment thread packages/pam/session/masking/credentials.go
Comment thread packages/pam/session/masking/pam-rules.toml Outdated
Comment thread packages/pam/session/masking/pam-rules.toml Outdated
@veria-ai

veria-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

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.

1 participant