8000 [Snyk] Fix for 2 vulnerabilities by dominicusin · Pull Request #3 · dominicusin/package-maximizer · GitHub
[go: up one dir, main page]

Skip to content

[Snyk] Fix for 2 vulnerabilities - #3

Merged
dominicusin merged 2 commits into
mainfrom
snyk-fix-1294b9fc16a8bdf5b58a7b9dfda438f8
Aug 25, 2026
Merged

dominicusin merged 2 commits into
mainfrom
snyk-fix-1294b9fc16a8bdf5b58a7b9dfda438f8

Conversation

@dominicusin
Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to fix 2 vulnerabilities in the pip dependencies of this project.

Snyk changed the following file(s):

  • requirements.txt
⚠️ Warning
equests 2.31.0 requires urllib3, which is not installed.
Flask 2.2.5 requires Werkzeug, which is not installed.
flake8 5.0.4 has requirement importlib-metadata<4.3,>=1.1.0; python_version < "3.8", but you have importlib-metadata 6.7.0.

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

@coderabbitai
coderabbitai Bot commented Jan 11, 2026 •
Copy link
Copy Markdown

Important

Review skipped

Ignore keyword(s) in the title.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e35f1efc-9918-4075-9fe6-a0d4e4c6d421

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review
Copy link
Copy Markdown

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: test (ubuntu-latest, 3.8)

Failed stage: Install Python dependencies [❌]

Failed test name: ""

Failure summary:

The action failed during dependency installation (pip install -r requirements.txt).
pip could not
resolve the requirement werkzeug>=3.1.5 because no such version exists on PyPI (available versions
only go up to 3.0.6 in the log), resulting in ERROR: No matching distribution found for
werkzeug>=3.1.5 and exit code 1.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

286:  Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
287:  Collecting pyyaml>=6.0 (from -r requirements.txt (line 3))
288:  Downloading PyYAML-6.0.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.1 kB)
289:  Collecting numpy>=1.20.0 (from -r requirements.txt (line 4))
290:  Downloading numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.6 kB)
291:  Collecting pandas>=1.3.0 (from -r requirements.txt (line 5))
292:  Downloading pandas-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB)
293:  Collecting matplotlib>=3.5.0 (from -r requirements.txt (line 6))
294:  Downloading matplotlib-3.7.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.metadata (5.7 kB)
295:  Collecting seaborn>=0.11.0 (from -r requirements.txt (line 7))
296:  Downloading seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
297:  Collecting psutil>=5.8.0 (from -r requirements.txt (line 8))
298:  Downloading psutil-7.2.1-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl.metadata (22 kB)
299:  Collecting flask>=2.0.0 (from -r requirements.txt (line 11))
300:  Downloading flask-3.0.3-py3-none-any.whl.metadata (3.2 kB)
301:  ERROR: Could not find a version that satisfies the requirement werkzeug>=3.1.5 (from versions: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.4.1, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.10, 0.10.1, 0.10.2, 0.10.4, 0.11, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6, 0.11.7, 0.11.8, 0.11.9, 0.11.10, 0.11.11, 0.11.12, 0.11.13, 0.11.14, 0.11.15, 0.12, 0.12.1, 0.12.2, 0.13, 0.14, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.15.4, 0.15.5, 0.15.6, 0.16.0, 0.16.1, 1.0.0rc1, 1.0.0, 1.0.1, 2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.0.0rc4, 2.0.0rc5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.2.0a1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6)
302:  ERROR: No matching distribution found for werkzeug>=3.1.5
303:  ##[error]Process completed with exit code 1.
304:  Post job cleanup.

@dominicusin
dominicusin merged commit 2dc5c2a into main Aug 25, 2026
2 of 15 checks passed
@dominicusin
dominicusin deleted the snyk-fix-1294b9fc16a8bdf5b58a7b9dfda438f8 branch August 25, 2026 23:22
dominicusin added a commit that referenced this pull request Aug 30, 2026
…eal repo integration (#20)

* feat: implement Phase 2 - additional parsers, solvers, analyzers, and utilities

Phase 2 implementation includes:

## New Parsers (3 added)
- **PacmanParser**: Parser for Pacman (Arch Linux) packages
  - Supports pacman -Q, pacman -Ss, pacman -Si formats
- **DNFParser**: Parser for DNF (Fedora/RHEL) packages
  - Supports dnf list, dnf info, dnf search formats
- **BrewParser**: Parser for Homebrew (macOS) packages
  - Supports brew list, brew info, brew search formats

## New Solvers (2 added)
- **MaxSatSolver**: SAT-based solver using MaxSAT
  - Uses python-sat library
  - Supports weighted optimization
- **MiniSatSolver**: SAT-based solver using MiniSat
  - Uses python-sat library
  - Supports weighted optimization

## New Analyzers (1 added)
- **ResultAnalyzer**: Analyzes maximization results
  - Compares installed vs proposed packages
  - Generates compatibility matrices
  - Provides dependency analysis
  - Supports solver comparison

## New Utilities
- **CacheManager**: Caching system for results
  - File-based and in-memory caching
  - TTL support
  - Cache decorator
- **BenchmarkRunner**: Performance testing framework
  - Generates test packages
  - Runs benchmarks across solvers
  - Exports reports (JSON, CSV)

## Updates
- Updated PackageMaximizer to support new components
- Updated solver registry with MaxSAT and MiniSat
- Updated parser registry with Pacman, DNF, Brew
- Added analyzer registry
- Version bump: 0.2.0 -> 0.3.0

## Tests
- Added 60+ new tests for all new components
- Total tests: 114 (all passing)

Closes #2

Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>

* feat: implement Phase 3 - version constraints, enhanced solver, and real repo integration

Phase 3 implementation includes:

## New Core Features
- **VersionConstraint**: Support for version comparison operators
  - ==, !=, >, >=, <, <=, ~ (compatible version)
  - Parses semantic versions (1.2.3, 2.0.0, etc.)
  - Handles version ranges
- **DependencyConstraint**: Version-aware dependency checking
- **ConflictConstraint**: Version-aware conflict detection
- **ConstraintParser**: Parses constraint strings into objects
  - Supports complex dependency specifications
  - Handles version constraints in dependencies and conflicts

## New Solver
- **EnhancedGreedySolver**: Improved greedy algorithm
  - Version constraint awareness
  - Smart dependency handling
  - Priority-based package selection
  - Configurable conflict resolution (skip/remove)
  - Weight support

## New Integration
- **RealRepoIntegration**: Integration with real package managers
  - APT (Debian/Ubuntu)
  - Pacman (Arch Linux)
  - DNF (Fedora/RHEL/CentOS)
  - Brew (macOS)
  - Methods:
    - get_installed_packages()
    - search_packages()
    - get_package_info()
    - check_package_installed()
    - get_available_updates()
    - get_system_info()

## Core Updates
- Updated PackageMaximizer to support version constraints
- Enhanced solver registry with EnhancedGreedySolver
- Version bump: 0.3.0 -> 0.4.0

## Tests
- Added 40+ new tests for constraints, enhanced solver, and integrations
- Total tests: 161 (100% pass rate)

## Usage Examples

### Version Constraints

### Enhanced Greedy Solver

### Real Repository Integration

Closes #3

Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>

---------

Co-authored-by: Vibe Nuage Agent <vibe@mistral.ai>
Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>
dominicusin added a commit that referenced this pull request Aug 30, 2026
…inal touches (#21)

* feat: implement Phase 2 - additional parsers, solvers, analyzers, and utilities

Phase 2 implementation includes:

## New Parsers (3 added)
- **PacmanParser**: Parser for Pacman (Arch Linux) packages
  - Supports pacman -Q, pacman -Ss, pacman -Si formats
- **DNFParser**: Parser for DNF (Fedora/RHEL) packages
  - Supports dnf list, dnf info, dnf search formats
- **BrewParser**: Parser for Homebrew (macOS) packages
  - Supports brew list, brew info, brew search formats

## New Solvers (2 added)
- **MaxSatSolver**: SAT-based solver using MaxSAT
  - Uses python-sat library
  - Supports weighted optimization
- **MiniSatSolver**: SAT-based solver using MiniSat
  - Uses python-sat library
  - Supports weighted optimization

## New Analyzers (1 added)
- **ResultAnalyzer**: Analyzes maximization results
  - Compares installed vs proposed packages
  - Generates compatibility matrices
  - Provides dependency analysis
  - Supports solver comparison

## New Utilities
- **CacheManager**: Caching system for results
  - File-based and in-memory caching
  - TTL support
  - Cache decorator
- **BenchmarkRunner**: Performance testing framework
  - Generates test packages
  - Runs benchmarks across solvers
  - Exports reports (JSON, CSV)

## Updates
- Updated PackageMaximizer to support new components
- Updated solver registry with MaxSAT and MiniSat
- Updated parser registry with Pacman, DNF, Brew
- Added analyzer registry
- Version bump: 0.2.0 -> 0.3.0

## Tests
- Added 60+ new tests for all new components
- Total tests: 114 (all passing)

Closes #2

Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>

* feat: implement Phase 3 - version constraints, enhanced solver, and real repo integration

Phase 3 implementation includes:

## New Core Features
- **VersionConstraint**: Support for version comparison operators
  - ==, !=, >, >=, <, <=, ~ (compatible version)
  - Parses semantic versions (1.2.3, 2.0.0, etc.)
  - Handles version ranges
- **DependencyConstraint**: Version-aware dependency checking
- **ConflictConstraint**: Version-aware conflict detection
- **ConstraintParser**: Parses constraint strings into objects
  - Supports complex dependency specifications
  - Handles version constraints in dependencies and conflicts

## New Solver
- **EnhancedGreedySolver**: Improved greedy algorithm
  - Version constraint awareness
  - Smart dependency handling
  - Priority-based package selection
  - Configurable conflict resolution (skip/remove)
  - Weight support

## New Integration
- **RealRepoIntegration**: Integration with real package managers
  - APT (Debian/Ubuntu)
  - Pacman (Arch Linux)
  - DNF (Fedora/RHEL/CentOS)
  - Brew (macOS)
  - Methods:
    - get_installed_packages()
    - search_packages()
    - get_package_info()
    - check_package_installed()
    - get_available_updates()
    - get_system_info()

## Core Updates
- Updated PackageMaximizer to support version constraints
- Enhanced solver registry with EnhancedGreedySolver
- Version bump: 0.3.0 -> 0.4.0

## Tests
- Added 40+ new tests for constraints, enhanced solver, and integrations
- Total tests: 161 (100% pass rate)

## Usage Examples

### Version Constraints

### Enhanced Greedy Solver

### Real Repository Integration

Closes #3

Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>

* feat: implement Phase 4 - enhanced CLI, improved documentation, and final touches

Phase 4 implementation includes:

## New CLI Commands (5 added)
- **list-installed**: Show installed packages from system
  - Options: --manager, --limit, --output (text/json)
- **search**: Search packages in repository
  - Options: --manager, --limit, --output (text/json)
- **info**: Show package information
  - Options: --manager, --output (text/json)
- **check-updates**: Check for available updates
  - Options: --manager, --output (text/json)
- **system-info**: Show system and package manager information
  - Options: --manager, --output (text/json)

## CLI Improvements
- Updated all commands to support --output json option
- Enhanced error handling
- Better help messages
- Consistent output formatting
- Support for all package managers in CLI commands

## Documentation
- **Completely rewritten README.md** with:
  - Project overview and features
  - Installation instructions
  - Quick start guide
  - Python API documentation
  - CLI usage examples
  - Solver comparison table
  - Configuration guide
  - Testing instructions
  - Contribution guidelines
- Added badges (Python version, license, GitHub stats)
- Organized by use cases

## Core Updates
- Updated __init__.py exports for all new components
- Version bump: 0.4.0 -> 0.5.0

## Tests
- Added tests for new CLI commands (test_cli_extended.py)
- Total tests: 175 (100% pass rate)

## CLI Usage Examples

### Package Management

### Maximization

### Information

## Final Project Status

### All Phases Completed ✅
- Phase 1: Core solvers (4), parsers (1), CLI, tests (52)
- Phase 2: Additional parsers (3), solvers (2), analyzer, cache, benchmark (114 tests)
- Phase 3: Version constraints, enhanced solver, real repo integration (161 tests)
- Phase 4: Enhanced CLI, documentation, final touches (175 tests)

### Total Statistics
- **Files**: 40+ Python files
- **Tests**: 175 (100% pass rate)
- **Solvers**: 7 (Greedy, EnhancedGreedy, Z3, PuLP, OR-Tools, MaxSAT, MiniSat)
- **Parsers**: 4 (APT, Pacman, DNF, Brew)
- **Integrations**: 1 (RealRepoIntegration)
- **Utilities**: 2 (CacheManager, BenchmarkRunner)
- **CLI Commands**: 11

Closes #4

Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>

---------

Co-authored-by: Vibe Nuage Agent <vibe@mistral.ai>
Co-authored-by: dominicusin <dominicusin@users.noreply.github.com>
Sign up for free to join this c 6383 onversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0