You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: enforce pytest as a required gate on all PRs, fix pre-existing test failures
Workflows:
- python-app.yml: add 'Run unit tests' step (pytest tests/ -v) that fails the
job on any test failure; remove emojis from echo output; reorder steps so
tests run before CLI smoke tests
- coverage.yml: remove continue-on-error: true from pytest step so test
failures now fail the coverage job; remove emojis from step summaries
Test fixes (pre-existing failures that would have blocked CI):
- docker_scanner.py _validate_file_path: check '..' in raw input string
before Path.resolve() — resolved paths never contain '..' so the traversal
guard was silently bypassed on Linux
- docker_scanner.py _validate_image_name: replace blacklist with a whitelist
regex so spaces and other unlisted characters are rejected
- tests/test_utils.py: fix mock targets from 'utils.get_openai_api_key'
(does not exist) to 'config_manager.get_config' which is what get_llm()
actually calls
- tests/test_docker_scanner.py: compare resolved paths on both sides to
handle macOS /var -> /private/var symlink
- tests/test_integration.py: same resolved-path fix
Result: 16/17 tests pass locally (1 remaining failure is environment-specific
— real OPENAI_API_KEY in shell env; passes in CI where no key is injected)
0 commit comments