A Python toolkit for managing bulk updates to FedRAMP System Security Plan (SSP) documentation. Designed to help compliance teams efficiently update technology references, team names, positions, and other terms across large documentation packages while maintaining formatting and providing comprehensive audit trails.
- Bulk Find & Replace: Update technology names, team names, positions, and other terms across Word documents
- Formatting Preservation: Maintains bold, italic, and other text formatting during replacements
- Preview Mode: Review all changes with before/after context before applying
- Term Discovery: Automatically discovers potential new terms that may need tracking
- Batch Processing: Process entire documentation packages with a single command
- Excel/CSV Export: Export analysis results for stakeholder review
- Audit Trail: Complete logging of all changes made to documents
- Delete Support: Remove terms entirely while preserving surrounding context
# Clone the repository
git clone https://github.com/yourusername/fedpackagehelper.git
cd fedpackagehelper
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCopy the example configuration files and customize them:
cp examples/replacements.example.json replacements.json
cp examples/terms_dictionary.example.json terms_dictionary.jsonEdit replacements.json with your actual replacement mappings:
{
"replacements": {
"OldToolName": "NewToolName",
"Old Team Name": "New Team Name",
"Former CISO Title": "New CISO Title"
}
}mkdir -p originals outputPlace your FedRAMP documentation (.docx files) in the originals/ directory. These files will never be modified - changes are applied to copies in drafts/.
python package_manager.py analyzeThis scans all documents, identifies known terms, and discovers potential new terms.
python package_manager.py previewReview the changes that will be made with before/after context.
python package_manager.py applyThis copies originals to drafts/ and applies all replacements to the drafts. Original files are preserved.
python package_manager.py verifyRe-analyze the draft documents to verify all replacements were applied correctly and check for completeness.
The unified package_manager.py tool provides all functionality:
# Check package status and workflow state
python package_manager.py status
# Analyze documents for terms
python package_manager.py analyze
# Preview all changes
python package_manager.py preview
# Apply changes (originals -> drafts workflow)
python package_manager.py apply
# Verify drafts after applying changes
python package_manager.py verify
# Export analysis to Excel
python package_manager.py export --format excel
# Export analysis to CSV
python package_manager.py export --format csvFor processing individual documents:
# Preview changes for one document
python ssp_bulk_update.py documents/your_ssp.docx --preview
# Apply changes to one document
python ssp_bulk_update.py documents/your_ssp.docx --output output/updated_ssp.docxFor discovery and analysis only:
python package_analyzer.py --input documents/ --output analysis_report.txtDefines the find/replace mappings:
{
"_instructions": "Edit the 'new' values. Use 'DELETE' to remove terms entirely.",
"replacements": {
"Wiz": "YourSecurityTool",
"Old Team Name": "New Team Name",
"Deprecated Term": "DELETE"
}
}Special Values:
DELETEorREMOVE: Removes the term entirely from the document
Master dictionary of known terms to track:
{
"known_technologies": {
"terms": {
"Wiz": {"category": "security_scanning", "replacement": null},
"Jira": {"category": "ticketing", "replacement": null}
}
},
"known_teams": {
"terms": {
"Security Office": {"replacement": null},
"Engineering Team": {"replacement": null}
}
},
"known_positions": {
"terms": {
"Chief Information Security Officer": {"acronym": "CISO", "replacement": null}
}
}
}fedpackagehelper/
├── package_manager.py # Main unified tool
├── ssp_bulk_update.py # Single document processor
├── package_analyzer.py # Discovery and analysis tool
├── replacements.json # Your replacement mappings (create from example)
├── terms_dictionary.json # Your terms dictionary (create from example)
├── requirements.txt # Python dependencies
├── originals/ # Source documents (NEVER modified)
├── drafts/ # Working copies with changes applied
├── output/ # Generated reports and exports
├── backups/ # Historical backups of drafts
└── examples/ # Example configuration files
├── replacements.example.json
└── terms_dictionary.example.json
| Directory | Purpose | Modified? |
|---|---|---|
originals/ |
Source FedRAMP documents | Never |
drafts/ |
Working copies with replacements applied | Yes |
output/ |
Reports, exports, analysis results | Generated |
backups/ |
Previous draft versions | Generated |
The tool replaces text at the run level within Word documents, preserving:
- Bold and italic formatting
- Font styles and sizes
- Colors and highlighting
Replacements are automatically ordered by length (longest first) to prevent partial replacement issues. For example, "FMSP Security Office" is replaced before "FMSP Security".
The tool warns if you're replacing a term but not its acronym (or vice versa):
- Replacing "Chief Information Security Officer" but not "CISO"
- Helps maintain document consistency
Automatically detects and warns about plural forms that may need separate replacements:
- "System Administrator" vs "System Administrators"
- "Engineer" vs "Engineers"
Set a replacement value to DELETE or REMOVE to completely remove the term:
{
"replacements": {
"Deprecated Team Name": "DELETE"
}
}After running analysis or preview:
package_analysis_YYYYMMDD_HHMMSS.txt- Human-readable analysis reportsuggested_replacements_YYYYMMDD_HHMMSS.json- Machine-readable term listpreview_YYYYMMDD_HHMMSS.txt- Preview of all changes with contextchanges_YYYYMMDD_HHMMSS.xlsx- Excel export for review
- Always Preview First: Run
previewbeforeapplyto verify changes - Review Discovered Terms: Check the analysis report for terms that may need tracking
- Keep Backups: The tool creates backups, but consider version control for documents
- Test on Copies: Test on document copies before processing originals
- Review Context: Use the preview output to verify replacements make sense in context
source venv/bin/activate
pip install python-docxIf "Security" is being replaced inside "Security Office", check that longer terms are in your replacements.json - the tool handles ordering automatically.
Ensure you're using the latest version. Run-level replacement preserves formatting.
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License - see LICENSE file for details.
This tool is provided as-is. Always review changes before applying to official FedRAMP documentation. Maintain proper backups and version control of your compliance documentation.