![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
playwright-redactor
Advanced tools
Ideally, you would invoke this app as part of your CI/CD pipeline as soon as Playwright has finished generating the trace files using the following command.
npx playwright-redactor -c ./config.json -t ./traces -r ./regexes.txt
The command above will redact the sensitive information from the trace files in the ./traces
folder using the configuration in the ./config.json
file. The regexes used for redaction are defined in the ./regexes.txt
file.
Options | |
---|---|
-r, --regexes <path> | Path to the text file containing the regular expression used for replacement. Each regex separated by a new line |
-c, --config <path> | Path to config file |
-t, --trace-files <path> | Folder path containing the trace files that require scrubbing |
The config file is a JSON file that contains the following properties:
{
"full_redaction": true,
"log_level": "debug",
"environment_variables": [
"SUPER_SECRET_PASSWORD",
"SUPER_SECRET_API_KEY",
"MY_APP_SECRET",
"SALESFORCE_API_KEY"
]
}
The config file above will perform a full redaction whenever a regex is matched using the regexes defined in the array. It will also redact the environment variables listed in the environment_variables
array.
Options | |
---|---|
full_redaction | REQUIRED: When set to true , a matched regex will be replaced with . When set to false , the app will obscure large parts of the secret. For example: password1234 will be redaced as pa******32 |
environment_variables | OPTIONAL: The value of these environment variables will be redacted from the trace files |
log_level | REQUIRED: Defaults to debug |
This is a text required by the tool via the -r
or --regexes
command line option.
The regex file will contain a list of regexes that will be used to replace the text in the trace files separated by a newline. The following example will search for super_password followed by 3 digits and replace it with . It will also search for all GUIDs and replace it with . Lastly, it will search for all JWTs and replace it with .
super_[AB]_password\d{3}
^(?:\{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$
^(?:[\w-]*\.[\w-]*\.[\w-]*)$
In all cases, the redaction of passwords and other sensitive information may not enough to protect your data. You should always be careful when sharing trace files with strangers on the internet. As an extra precaution, try and scrub session information e.g jwt token, cookies etc from your trace files.
FAQs
Remove sensitive data from your Playwright trace files
The npm package playwright-redactor receives a total of 0 weekly downloads. As such, playwright-redactor popularity was classified as not popular.
We found that playwright-redactor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.