<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TraceSafe Guides]]></title><description><![CDATA[Practical guides for sharing HAR files, logs, JSON, and cURL safely. Learn how to remove tokens, cookies, and sensitive data before sending diagnostics to suppo]]></description><link>https://tracesafe-guides.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ab1e9a532d0c9363aeb80fc/d76cd6b2-ebaf-4920-b440-bc7cc1deb0a7.svg</url><title>TraceSafe Guides</title><link>https://tracesafe-guides.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 08:12:32 GMT</lastBuildDate><atom:link href="https://tracesafe-guides.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Before you share a cURL command, check these seven places for secrets]]></title><description><![CDATA[Copying a failed request as cURL is a fast way to give a teammate enough context to reproduce an API problem. It is also a fast way to copy the credentials that were attached to that request.
A useful]]></description><link>https://tracesafe-guides.hashnode.dev/before-you-share-a-curl-command-check-these-seven-places-for-secrets</link><guid isPermaLink="true">https://tracesafe-guides.hashnode.dev/before-you-share-a-curl-command-check-these-seven-places-for-secrets</guid><category><![CDATA[curl]]></category><category><![CDATA[Security]]></category><category><![CDATA[debugging]]></category><category><![CDATA[privacy]]></category><dc:creator><![CDATA[george]]></dc:creator><pubDate>Mon, 28 Sep 2026 08:28:01 GMT</pubDate><content:encoded><![CDATA[<p>Copying a failed request as cURL is a fast way to give a teammate enough context to reproduce an API problem. It is also a fast way to copy the credentials that were attached to that request.</p>
<p>A useful handoff keeps the HTTP method, route, relevant header names, and body shape. It removes access credentials and customer data. Here is the checklist I use before putting a cURL command in a ticket, chat, issue, or AI prompt.</p>
<h2>1. Authorization headers</h2>
<p>Look for <code>-H</code> or <code>--header</code> options containing <code>Authorization</code>, <code>Proxy-Authorization</code>, <code>X-API-Key</code>, or a vendor-specific token header. Keep the header name if it matters to debugging, but replace its value. A copied browser request may contain several headers; do not stop after checking the first one.</p>
<h2>2. Cookies</h2>
<p>Check both <code>-H 'Cookie: ...'</code> and <code>-b</code> / <code>--cookie</code>. Session cookies may grant access even when the command has no visible <code>Authorization</code> header. Remove the actual cookie values before sharing.</p>
<h2>3. URL parameters</h2>
<p>Read the entire URL, including its query string. Values called <code>token</code>, <code>key</code>, <code>signature</code>, or <code>code</code> are obvious candidates, but a private customer ID or email address can appear in any parameter. Keep the path and parameter names when they help explain the failure; replace the private values.</p>
<h2>4. Request bodies and form fields</h2>
<p>Inspect <code>--data</code>, <code>--data-raw</code>, <code>--data-binary</code>, <code>--data-urlencode</code>, and <code>--form</code>. A JSON body can contain passwords, payment details, email addresses, or free-text notes. For a reproducible example, retain field names and types while substituting synthetic values.</p>
<h2>5. Other authentication options</h2>
<p>Credentials can also be supplied through <code>-u</code> / <code>--user</code>, <code>--oauth2-bearer</code>, <code>--netrc</code>, proxy options, or client certificate options. If the command refers to a local credential file, do not attach that file with the ticket. Record only the fact that this authentication method was used, unless your support process explicitly requires more.</p>
<h2>6. Referenced files and output</h2>
<p>An <code>@file</code> argument can tell cURL to read a local file. Inspect the file before sharing it; the command text alone may not show its contents. If you also plan to share <code>--verbose</code>, <code>--trace</code>, or saved response output, review those artifacts separately. Sanitizing the command does not sanitize an attached trace.</p>
<h2>7. Redirects and repeated values</h2>
<p>Check <code>--location</code> and any redirect URL you include in the report. Then search the cleaned copy for values that might be repeated in more than one place, such as the same token in a header and query string. Replacing one occurrence is not enough.</p>
<h2>A small synthetic example</h2>
<p>This is an illustrative command. The host and values are placeholders; it is not intended to run against a real service.</p>
<pre><code class="language-sh">curl 'https://api.example.invalid/v1/orders?customer_id=customer-example&amp;signature=[REMOVED]' \
  -H 'Authorization: Bearer [REMOVED]' \
  -H 'Cookie: session=[REMOVED]' \
  -H 'Content-Type: application/json' \
  --data-raw '{"order_id":"order-example","email":"person@example.invalid"}'
</code></pre>
<p>The command still shows the endpoint, query parameter names, headers, HTTP body shape, and the fact that authentication and a session cookie were present. It does not reveal their original values. If a particular account identifier is essential to reproduce the bug, use a synthetic identifier with the same format or arrange a secure handoff under your team's policy.</p>
<p>Before sending, read the whole cleaned command once more. Check that it is still useful for diagnosing the issue and that no original secret remains. If the raw command was already shared, redaction of a later copy does not revoke the exposed credential; follow your incident process for restricting the original and rotating credentials where appropriate.</p>
<p>I built <a href="https://www.tracesafe.top/?utm_source=hashnode&amp;utm_medium=content&amp;utm_campaign=curl_checklist">TraceSafe</a> to help review diagnostic text locally in the browser. It accepts <code>.curl</code> text files and highlights several common credential and personal-data patterns before export. It is a review aid, not a guarantee that every custom header, file reference, or organization-specific secret will be detected. You can start with its built-in synthetic sample, and you should inspect the output yourself before sharing it.</p>
<p>What is the most surprising place you have found a credential in a copied request?</p>
<p><em>This article was prepared with AI assistance. The examples are synthetic.</em></p>
<h2>References</h2>
<ul>
<li><p><a href="https://curl.se/docs/manpage.html">cURL option reference</a></p>
</li>
<li><p><a href="https://developer.chrome.com/docs/devtools/network/reference/">Chrome DevTools Network reference</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How to sanitize a HAR file before sharing it with support, vendors, or AI]]></title><description><![CDATA[When a checkout fails, authentication loops, or an API call becomes unexpectedly slow, a HAR file is often the fastest way to show another engineer what happened.
It is also easy to share far more tha]]></description><link>https://tracesafe-guides.hashnode.dev/how-to-sanitize-a-har-file-before-sharing-it-with-support-vendors-or-ai</link><guid isPermaLink="true">https://tracesafe-guides.hashnode.dev/how-to-sanitize-a-har-file-before-sharing-it-with-support-vendors-or-ai</guid><category><![CDATA[Security]]></category><category><![CDATA[privacy]]></category><category><![CDATA[webdev]]></category><category><![CDATA[devtools]]></category><dc:creator><![CDATA[george]]></dc:creator><pubDate>Tue, 22 Sep 2026 03:57:24 GMT</pubDate><content:encoded><![CDATA[<p>When a checkout fails, authentication loops, or an API call becomes unexpectedly slow, a HAR file is often the fastest way to show another engineer what happened.</p>
<p>It is also easy to share far more than intended.</p>
<p>A HAR is structured JSON containing browser requests and responses. Depending on the capture, it can include authorization headers, cookies, bearer tokens, signed URLs, request bodies, response previews, email addresses, internal hostnames, and identifiers that should not leave the original environment.</p>
<p>Before attaching a trace to a support ticket, sending it to a vendor, or pasting part of it into an AI assistant, I use the following workflow.</p>
<h2>1. Capture only the smallest useful window</h2>
<p>Reproduce the issue, then stop the capture. Avoid visiting unrelated account pages while DevTools is recording, and do not export a broad browsing session just because it is convenient.</p>
<p>The less unrelated activity a HAR contains, the less data you need to inspect and remove later.</p>
<h2>2. Assume every HAR may contain credentials</h2>
<p>The obvious places are HTTP headers, but that is not the whole story. Review at least:</p>
<ul>
<li><p><code>Authorization</code>, <code>Proxy-Authorization</code>, <code>Cookie</code>, and <code>Set-Cookie</code> headers</p>
</li>
<li><p>API keys, bearer tokens, CSRF values, session identifiers, and signed URLs</p>
</li>
<li><p>Query parameters and redirect URLs</p>
</li>
<li><p>Request bodies and response previews</p>
</li>
<li><p>Email addresses, names, phone numbers, account IDs, and form values</p>
</li>
<li><p>Internal hostnames, private IP addresses, tenant IDs, and debugging metadata</p>
</li>
</ul>
<p>Deleting the visible <code>cookies</code> section is not enough. The same session value can be repeated in headers, URLs, nested JSON, or a response body.</p>
<h2>3. Work from a copy and keep the original restricted</h2>
<p>Keep the original capture where it belongs. Make a copy for sanitization, then use that copy for review and export.</p>
<p>This matters because a good sanitized trace should still be useful for debugging. Timestamps, request order, status codes, error responses, and stack-related context often explain the failure. Removing every line may make the trace safe, but it may also make it impossible for the next engineer to help.</p>
<h2>4. Replace values consistently instead of blindly deleting them</h2>
<p>Consistent placeholders preserve relationships in the diagnostic. For example, if the same token appears in three requests, a reviewer can still see that it is the same value without seeing the original secret.</p>
<pre><code class="language-text">Authorization: Bearer [REDACTED_TOKEN]
customer_email: [REDACTED_EMAIL]
redirect_uri: https://example.invalid/callback?state=[REDACTED_VALUE]
</code></pre>
<p>The goal is not an empty file. It is the minimum useful diagnostic with access and identity data removed.</p>
<h2>5. Review the result before the next handoff</h2>
<p>Automated detection reduces repetitive work, but it cannot know every organization-specific secret or decide whether a field is necessary for a particular incident. Before sharing the cleaned copy, search again for values you recognize and open the output to make sure it still reproduces the relevant request sequence.</p>
<p>For an already shared raw file, create a sanitized replacement for the investigation, restrict or remove the original attachment where possible, and rotate any active credential that may have been exposed. Redaction cannot revoke a token that has already left your control.</p>
<h2>A local-first option for the review step</h2>
<p>I built <a href="https://www.tracesafe.top/?utm_source=hashnode&amp;utm_medium=content&amp;utm_campaign=first_launch">TraceSafe</a> to make this review step easier. Its scanning workflow runs in the browser: you can review findings in HAR, JSON, LOG, TXT, and cURL diagnostics, choose replacements, and export a structure-preserving safe copy and cleaning report. The source diagnostic file is not uploaded to the TraceSafe server during this scanning workflow.</p>
<p>You can test the workflow with the built-in synthetic sample; please do not use a public demo or a community post to share real credentials, customer data, or raw production diagnostics.</p>
<p><a href="https://www.tracesafe.top/?utm_source=hashnode&amp;utm_medium=content&amp;utm_campaign=first_launch">Try the local sample workflow</a></p>
<p><a href="https://youtu.be/64geXS_n6ZI">Watch the TraceSafe demo on YouTube</a></p>
<h2>A short checklist before you share</h2>
<ul>
<li><p>Capture the smallest window that reproduces the issue.</p>
</li>
<li><p>Sanitize a copy, not the original.</p>
</li>
<li><p>Remove access credentials before anything else.</p>
</li>
<li><p>Review repeated headers, URLs, nested JSON, and response bodies.</p>
</li>
<li><p>Preserve diagnostic structure with consistent placeholders.</p>
</li>
<li><p>Re-open and validate the sanitized copy.</p>
</li>
<li><p>Use the secure channel required by your organization or support provider.</p>
</li>
</ul>
<p>What patterns have you found most often in HAR files that should have been removed before a support handoff?</p>
]]></content:encoded></item></channel></rss>