Remove default_data files to prevent security exposure of configuration and secrets #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Removed all files from the
default_data/directory to eliminate potential security vulnerabilities from committed seed data, default configuration values, and test credentials. The directory structure is preserved with a.gitkeepfile, and comprehensive documentation has been added to guide developers on secure alternatives for data seeding.Motivation
The
default_data/directory previously contained 27 JSON and SQL files with seed data including:These files posed security risks:
Changes Made
1. File Removal (7,337 lines)
Removed all 27 tracked files from
default_data/including:aiprompts.json,ai_metrics.jsonarticles.json,products.json,images.jsonemail_templates.json,internationalisations.json2. Directory Preservation
Added
default_data/.gitkeepwith inline documentation explaining:3. .gitignore Enhancement
Updated
.gitignoreto prevent future commits:Verified with test files - new files in
default_data/are properly ignored.4. Documentation Updates
SECURITY.md - Added "Default Data and Seed Files Policy" section:
default_data/.envfiles (never committed)SETUP_GUIDE.md - Added "Data Seeding" section:
default_data/is intentionally emptyBackward Compatibility
✅ No breaking changes - All existing code remains functional:
Application startup (
run_dev_env.sh): Import commands are wrapped in conditional blocks that show warnings on failure, not errors. The application starts successfully with emptydefault_data/.Import/Export commands:
DefaultDataImportCommandandDefaultDataExportCommandhandle missing files gracefully:Development workflow: Import/export commands remain available for developers who maintain local seed files (which are now properly ignored by git).
Tests: No test files reference
default_data/- test suite unaffected.Migration Guide
For New Developers
default_data/will be empty./run_dev_env.shFor Existing Developers with Local Seed Data
If you have local seed files you want to preserve:
Security Impact
Eliminated:
Preserved:
Verification
.gitignoreprevents new files indefault_data/from being committed.gitkeepis tracked and preserves directory structuredefault_data/filesFiles changed: 31 | Lines added: 62 | Lines removed: 7,337
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.