Skip to content

Potential fix for code scanning alert no. 48: Clear-text logging of sensitive information - #161

Open
ThePlenkov wants to merge 1 commit into
mainfrom
alert-autofix-48
Open

Potential fix for code scanning alert no. 48: Clear-text logging of sensitive information#161
ThePlenkov wants to merge 1 commit into
mainfrom
alert-autofix-48

Conversation

@ThePlenkov

@ThePlenkov ThePlenkov commented Aug 6, 2026

Copy link
Copy Markdown
Member

Potential fix for https://github.com/abapify/adt-cli/security/code-scanning/48

General fix: never log entire request header objects, even “masked,” because redaction can miss fields now or in future refactors. Prefer logging only minimal, non-sensitive metadata.

Best fix here without changing functionality: in packages/adt-client/src/adapter.ts, replace the current safeHeaders object logging block near lines 377–386 with an allowlisted summary (e.g., header names only and count). This preserves debugging usefulness while eliminating value exposure risk. No new imports or dependencies are needed.

Concretely:

  • Keep the existing logger?.debug(\HTTP ${options.method} ${url.toString()}`)`.
  • Replace the safeHeaders + JSON.stringify block with:
    • const headerNames = Object.keys(headers).sort();
    • log: 'Request headers (names only): ' + JSON.stringify(headerNames)
    • optionally log count for observability.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.


Summary by cubic

Prevent clear-text logging of sensitive HTTP headers by logging header names only in packages/adt-client/src/adapter.ts, addressing code scanning alert 48. Keeps the existing debug of method and URL; no behavior changes.

Written for commit bc65cde. Summary will update on new commits.

Review in cubic

…ensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for adt-cli canceled.

Name Link
🔨 Latest commit bc65cde
🔍 Latest deploy log https://app.netlify.com/projects/adt-cli/deploys/6a746a705ebb11000871e934

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ThePlenkov, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc00ca8e-1294-40b0-807f-64bf0e3d608a

📥 Commits

Reviewing files that changed from the base of the PR and between e28148b and bc65cde.

📒 Files selected for processing (1)
  • packages/adt-client/src/adapter.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ThePlenkov
ThePlenkov marked this pull request as ready for review August 6, 2026 11:05
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@amazon-q-developer amazon-q-developer Bot 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.

This PR successfully addresses the clear-text logging security vulnerability by replacing header value logging with header name-only logging. The implementation correctly eliminates the risk of sensitive data exposure in logs while maintaining debugging utility. The change is minimal, focused, and effective - no blocking issues found.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@nx-cloud

nx-cloud Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit bc65cde

Command Status Duration Result
nx affected -t lint test build e2e-ci --verbose... ✅ Succeeded 42s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-06 11:06:55 UTC

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.

1 participant