- Implement tests for ImportSuccessModal to verify rendering and functionality. - Update AuthContext to store authentication token in localStorage and manage token state. - Modify useImport hook to capture and expose commit results, preventing unnecessary refetches. - Enhance useCertificates hook to support optional refetch intervals. - Update Dashboard to conditionally poll certificates based on pending status. - Integrate ImportSuccessModal into ImportCaddy for user feedback on import completion. - Adjust Login component to utilize returned token for authentication. - Refactor CrowdSecConfig tests for improved readability and reliability. - Add debug_db.py script for inspecting the SQLite database. - Update integration and test scripts for better configuration and error handling. - Introduce Trivy scan script for vulnerability assessment of Docker images.
21 lines
572 B
Bash
Executable File
21 lines
572 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Build the local image first to ensure it's up to date
|
|
echo "Building charon:local..."
|
|
docker build -t charon:local .
|
|
|
|
# Run Trivy scan
|
|
echo "Running Trivy scan on charon:local..."
|
|
docker run --rm \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v $HOME/.cache/trivy:/root/.cache/trivy \
|
|
-v $(pwd)/.trivy_logs:/logs \
|
|
aquasec/trivy:latest image \
|
|
--severity CRITICAL,HIGH \
|
|
--output /logs/trivy-report.txt \
|
|
charon:local
|
|
|
|
echo "Scan complete. Report saved to .trivy_logs/trivy-report.txt"
|
|
cat .trivy_logs/trivy-report.txt
|