Enterprise-grade tool to redact secrets and anonymise identifiers in pfSense/Netgate config.xml exports. Preserves network topology while removing passwords, VPN keys, certificates, public IPs, domains, and MACs for safe sharing with support teams, consultants, AI tools, and forums.
Project description
pfSense XML Configuration Redactor
Redact secrets from a pfSense config.xml so you can share it with Netgate
support, a vendor, a forum or an AI tool, without handing over your passwords,
keys and network layout.
Unlike generic XML redaction, it understands pfSense structures: IPsec, OpenVPN, WireGuard, captive portal, and the package configs where credentials actually hide.
Install
pip install pfsense-redactor
Pure Python standard library, no dependencies, Python 3.9+.
If pip reports externally-managed-environment
Common on macOS and recent Linux distributions. Any of these work:
pipx install pfsense-redactor # recommended for CLI tools
python3 -m venv venv && source venv/bin/activate
pip install pfsense-redactor
pip install --user pfsense-redactor
From source
git clone https://github.com/grounzero/pfsense-redactor.git
cd pfsense-redactor
pip install -e .
Quick start
Sharing with support, keeping internal addressing readable:
pfsense-redactor config.xml redacted.xml --keep-private-ips
Removes secrets and public identifiers, leaves RFC 1918 addressing intact so whoever is helping can still follow your topology.
Sharing with a vendor, forum or AI tool, anonymising identifiers:
pfsense-redactor config.xml redacted.xml --anonymise
Replaces addresses and domains with consistent placeholders, so relationships between rules and interfaces survive while the real values do not.
Check before you commit to it:
pfsense-redactor config.xml --dry-run-verbose
Prints what would change, with samples safely masked.
Using an unusual package? Add --aggressive. Webhook tokens live in URL
paths, and paths are otherwise preserved so package feed URLs are not destroyed.
Slack, Discord and Telegram are recognised and redacted without it; anything
else needs the flag. See
security.
How well does it work?
Measured against a 46-secret canary corpus that ships with the repository:
| Tool | Caught |
|---|---|
| pfsense-redactor | 42 / 46 (43 with --redact-descriptions) |
| ForesightCyber Config Anonymizer | 17 / 46 |
| netgate-xlsx | 11 / 46 |
The corpus was built alongside this tool, which biases it. The four misses are documented rather than hidden. Run it yourself:
pfsense-redactor tests/corpus/canary-corpus.xml --stdout --aggressive \
| grep -oE 'CANARY_[A-Z0-9_]+' | sort -u
Full method, caveats and per-secret results in the benchmark.
Before you share the output
Never restore a redacted file to pfSense. Comments, CDATA and some metadata do not survive the round trip. Keep your original.
Read the run summary. It reports high-entropy values it deliberately kept, with their element paths, so you can audit them. For a second opinion from a scanner that fails differently, see verifying output.
Documentation
| Guide | Covers |
|---|---|
| CLI reference | Every flag, with examples |
| Use cases | Netgate TAC, AI tools, MSP handoff, audits, and how this relates to diag_sanitize.php |
| Allow-lists | Keep specific IPs, CIDRs and domains readable |
| Security | Threat model, what gets redacted, path safety |
| Verifying output | Checking the result, and using gitleaks alongside |
| Benchmark | Canary corpus results and known gaps |
| Examples | Before/after output, statistics, testing |
| FAQ | Common questions |
| Changelog | Release history |
Contributing
Issues and pull requests are welcome. If you find a secret that survives
redaction, that is the most valuable report there is. A minimal fragment with
the value replaced by a CANARY_* marker can go straight into the corpus so the
miss stays fixed.
Run the tests with:
pip install -e ".[dev]"
pytest
Licence
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pfsense_redactor-1.1.2.tar.gz.
File metadata
- Download URL: pfsense_redactor-1.1.2.tar.gz
- Upload date:
- Size: 248.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca8832426c70cd6aa8417a5876f87ffeb9d2841663702adb3a4c33df6ec91522
|
|
| MD5 |
fbbf4d53308a46bc433855039b6109f8
|
|
| BLAKE2b-256 |
62dcacdd69813a936c87fdd86e9a55ef95fa9cd29f3d9b19cc9ccbac0c1f0e00
|
Provenance
The following attestation bundles were made for pfsense_redactor-1.1.2.tar.gz:
Publisher:
python-publish.yml on grounzero/pfsense-redactor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfsense_redactor-1.1.2.tar.gz -
Subject digest:
ca8832426c70cd6aa8417a5876f87ffeb9d2841663702adb3a4c33df6ec91522 - Sigstore transparency entry: 2269716250
- Sigstore integration time:
-
Permalink:
grounzero/pfsense-redactor@8af7713d6fe16332ef0e19702382712a61718470 -
Branch / Tag:
refs/tags/1.1.2 - Owner: https://github.com/grounzero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8af7713d6fe16332ef0e19702382712a61718470 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pfsense_redactor-1.1.2-py3-none-any.whl.
File metadata
- Download URL: pfsense_redactor-1.1.2-py3-none-any.whl
- Upload date:
- Size: 50.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42f0cb55040283fb8947056a2f24847eaa3be997816c926dde9a606fe68ae7a1
|
|
| MD5 |
ae9ff38956cd88552a802b3286795b17
|
|
| BLAKE2b-256 |
d37ae73a8931931d237a0653a7a3a400bbbdfbc867fd5a12cfb3e82c86cec261
|
Provenance
The following attestation bundles were made for pfsense_redactor-1.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on grounzero/pfsense-redactor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfsense_redactor-1.1.2-py3-none-any.whl -
Subject digest:
42f0cb55040283fb8947056a2f24847eaa3be997816c926dde9a606fe68ae7a1 - Sigstore transparency entry: 2269716668
- Sigstore integration time:
-
Permalink:
grounzero/pfsense-redactor@8af7713d6fe16332ef0e19702382712a61718470 -
Branch / Tag:
refs/tags/1.1.2 - Owner: https://github.com/grounzero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8af7713d6fe16332ef0e19702382712a61718470 -
Trigger Event:
release
-
Statement type: