Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses lint issues identified by ruff, removing unused code and fixing unnecessary f-string usage.
- Removed unused import statements (
reandOptional) - Removed unused exception variable in error handling
- Fixed empty f-strings that should be regular strings
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/dir2md/spicy.py |
Removed unused re import and unused exception variable e in error handling |
src/dir2md/query/suggester.py |
Fixed two empty f-strings to regular strings in print statements |
src/dir2md/compressors/gravitas.py |
Removed unused imports Optional and re |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
flamehaven01
pushed a commit
that referenced
this pull request
Dec 18, 2025
Complete SIDRCE Spicy Audit response with advanced configuration system. ## Security & Reliability Fixes (5/5 Issues Resolved) CRITICAL: Markdown Fence Injection (Issue #5) - Implemented dynamic fence escaping that counts consecutive backticks - Prevents markdown structure corruption and injection attacks - Files: src/dir2md/markdown.py HIGH: Subprocess RCE Vector (Issue #1) - Removed vulture subprocess.run() call completely - Eliminates security risk and unreliable external dependency - Files: src/dir2md/spicy.py MEDIUM: Silent Exception Failures (Issue #2) - Replaced bare except with specific exception handling - Added logging.warning() for .env load failures - Files: src/dir2md/cli.py LOW: Aggressive Glob Expansion (Issue #3) - Removed automatic pattern expansion (foo/ -> [foo/, **/foo, ...]) - Now respects gitignore standard and user intent - Files: src/dir2md/walker.py LOW: Hardcoded DEFAULT_EXCLUDES (Issue #4) - Moved to external defaults.json file - Removed personal preferences (.pytest_cache_local) - Added graceful fallback mechanism - Files: src/dir2md/cli.py, src/dir2md/defaults.json (new) ## Advanced Configuration System Three-tier Priority System: 1. System defaults (lowest): defaults.json or --defaults-file 2. Project config (medium): pyproject.toml [tool.dir2md.excludes] 3. User CLI (highest): --exclude-glob New Features: - --defaults-file CLI argument for custom defaults path - pyproject.toml [tool.dir2md.excludes] support - Priority-based exclude pattern merging ## Testing & Quality - All tests passing: 22/22 (100%) - Code coverage: 55% overall, 87-95% on patched modules - Build verified: tar.gz + wheel with defaults.json included - Backward compatibility: 100% maintained ## Grade Improvement SIDRCE Spicy Audit: C+ -> A (90-94 points) - Security: C -> A+ - Reliability: B- -> A - Performance: B -> A - Maintainability: C+ -> A - Configuration: D -> A+ Production ready.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Testing
Codex Task