Sifts
Code analysis tool with YAML configuration support.
Configuration
You can now run Sifts using a YAML configuration file:
python -m src.cli run-with-config config_example.yaml
Configuration Format
The configuration file follows this structure:
analysis:
working_dir: "." # Working directory (must exist)
include_files:
- "src/**/*.py" # Glob patterns for files to include
exclude_files:
- "tests/**" # Glob patterns for files to exclude
lines_to_check: # Specific lines to check in specific files (must exist)
- file: "src/cli.py"
lines: [12, 45, 78]
- file: "src/config.py" # You can specify multiple files
lines: [10, 20]
- file: "src/cli.py" # Entries with the same file path will be merged
lines: [100, 200] # Will be combined with the previous entry for src/cli.py
include_vulnerabilities: # Types of vulnerabilities to check for
- insecure_auth
- sql_injection
- xss
exclude_vulnerabilities: [] # Types of vulnerabilities to exclude
use_default_exclude_files: true # Use default exclude files list
split_subdirectories: true # Split subdirectories for analysis
output:
format: "json" # Output format
path: "reports/report.json" # Output file path (directory will be created if needed)
runtime:
parallel: true # Whether to run in parallel
threads: 4 # Number of threads to use
Line Merging
When multiple entries in lines_to_check reference the same file path, they will be automatically merged into a single entry with the combined list of line numbers. Duplicate line numbers are automatically removed, and the final list is sorted in ascending order.
For example, the above configuration will result in the following after processing:
lines_to_check:
- file: "src/cli.py"
lines: [12, 45, 78, 100, 200] # Combined from both entries
- file: "src/config.py"
lines: [10, 20]
Path Validation
The configuration includes strict path validation:
Paths that must exist (for analysis)
- Working directory (
working_dir) - Files specified in
lines_to_check - Exact file paths in
include_files(non-glob patterns)
Paths that will be created (for output)
- Output directory (parent directory of
output.path)
The validation ensures that all files to be analyzed actually exist, while automatically creating any necessary output directories.
Requirements
Install the required dependencies using Poetry:
poetry install
Metadata
Release files for fluidattacks-sifts 0.20.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fluidattacks_sifts-0.20.0.tar.gz | 4.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fluidattacks_sifts-0.20.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 MB
Release files / fluidattacks_sifts-0.20.0.tar.gz
| Download URL | fluidattacks_sifts-0.20.0.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fef569ce4eabe9cad78c8eafadba9de3e0d0b83f9d424b50d731aeb979a6394
|
|
BLAKE2b-256 checksum How to use checksums |
f88435f442953ef8d4896581f45e93118e26a50f373cc0f24d5815167874373b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Release files / fluidattacks_sifts-0.20.0-py3-none-any.whl
| Download URL | fluidattacks_sifts-0.20.0-py3-none-any.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45378c3c4b6288c3621d3bf9a139f021d238d890b54dddd82b4a03c7f99d0c73
|
|
BLAKE2b-256 checksum How to use checksums |
7b1920cd149470a4dc9a075440e593848fd7a0c00b7873f01e14fdff132d8b1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|