Commit Graph
7754 Commits
Author SHA1 Message Date
Andoni A. cbf27b1e2c Merge remote-tracking branch 'origin/master' into feat/PROWLER-940-stage-2-a-image-provider-api-v2 2026-02-19 14:14:03 +01:00
Andoni A. 293a416e0d chore(image): remove test notebooks 2026-02-18 16:00:19 +01:00
Andoni A. 6be6f558c1 refactor(image): make image the resource instead of individual findings
- Add image_sha field to CheckReportImage from Trivy Metadata.ImageID
- Build resource_uid as "{image_name}:{short_sha}" in both CLI and API paths
- Set ServiceName to "container-image" for all image findings
- Pass clean image name as resource_name, Trivy target as resource_details
2026-02-18 14:47:37 +01:00
Alejandro Bailo 5f2e4eb2a6 fix(ui): replace HeroUI dropdowns with shadcn selects (#10097) 2026-02-18 13:46:57 +01:00
Andoni A. acbfdfa4b2 fix(image): address PR review items for image provider
- Remove dead docker login/pull/logout code and exceptions
- Fix finding metadata: empty RelatedUrl, Categories per finding type
- Replace SystemExit(0) with _listing_only flag in registry listing
- Use dynamic prowler_version in User-Agent header
- Normalize image UID by stripping protocol prefix on save
- Skip compliance and attack surface tasks for Image and IaC providers
- Add tests for scan_per_image and IMAGE scan path
2026-02-18 12:24:35 +01:00
Alan Buscaglia 639333b540 feat(ui): setup vitest with react testing library and TDD workflow (#9925) 2026-02-18 11:25:50 +01:00
Andoni A. 7bd13cdf39 fix(image): set custom User-Agent to avoid Cloudflare bot blocking
Cloudflare bot management on Docker Hub blocks the default
python-requests User-Agent from container IPs, returning HTTP 500.
Add a Prowler/1.0 User-Agent header to all registry requests and
include truncated response body in 5xx retry logs for diagnostics.
2026-02-18 11:08:33 +01:00
Pedro Martín b732cf4f06 feat(docker): ulimits to worker services to prevent exhaustion (#10107) 2026-02-18 10:23:02 +01:00
Andoni A. 34cbacc105 feat(image): add IMAGE scan path with per-image progress
- Add scan_per_image() generator to ImageProvider for per-image yields
- Replace single-shot IMAGE execution in Scan.scan() with per-image progress
- Extend checks_loader bypass to include IMAGE provider
2026-02-18 10:19:12 +01:00
Josema CamachoandCopilot be3be3eb62 fix(api): clean up temp Neo4j databases on scan failure and provider deletion (#10101)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 10:18:34 +01:00
Andoni A. 12f1a4f3bb fix(image): add 5xx retry and better diagnostics for Docker Hub auth
- Add server error retry with exponential backoff in _request_with_retry
- Include truncated response body in Docker Hub login errors
- Add debug logging for login attempts
2026-02-18 10:16:41 +01:00
Daniel Barranquero 338d514197 fix(api): gcp project id validation for legacy projects (#10078) 2026-02-18 10:11:07 +01:00
Pedro Martín fec86754d8 fix(compliance): remove account_id and location for manual reqs (#10105) 2026-02-18 09:46:19 +01:00
Andoni A. 923ee82830 chore(api): bump Trivy to 0.69.1 2026-02-18 09:42:18 +01:00
Pedro Martín 313da7ebf5 feat(ui): add CSV and PDF download buttons to compliance views (#10093) 2026-02-18 09:36:54 +01:00
Andoni A. a5e5217e60 fix(image): use Trivy native auth instead of docker login/pull
- Pass TRIVY_USERNAME/TRIVY_PASSWORD env vars for registry auth
- Remove docker login, docker pull, and docker logout dependencies
- Eliminates need for Docker binary inside the worker container
2026-02-18 09:24:43 +01:00
Andoni A. 707b3b484e chore(api): update poetry.lock for image provider SDK branch 2026-02-18 08:59:45 +01:00
Andoni A. 348808b37f feat(image): add image provider scan support to Scan class and API layer
- Add image provider handling in Scan class alongside IaC (skip check loading, run Trivy directly)
- Add image provider API models, serializers, and connection check logic
- Point API SDK dependency to this feature branch
- Add test notebook for image provider API workflow
2026-02-18 08:59:13 +01:00
Josema CamachoandAlan Buscaglia 7698cdce2e feat(attack-paths): add graph_data_ready field to decouple query availability from scan state (#10089)
Co-authored-by: Alan Buscaglia <gentlemanprogramming@gmail.com>
2026-02-17 17:29:36 +01:00
Pedro Martín ff25d6a8c2 fix(ui): changes for update credetials for AliababaCloud provider (#10098) 2026-02-17 15:50:02 +01:00
Rubén De la Torre VicoandDaniel Barranquero 04b43b20ae chore(azure): enhance metadata for vm service (#9629)
Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
2026-02-17 13:30:27 +01:00
Rubén De la Torre VicoandDaniel Barranquero 7d8de1d094 chore(azure): enhance metadata for entra service (#9619)
Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
2026-02-17 12:53:27 +01:00
Sandiyo ChristanandAndoni A. 2c2881b351 fix(oss): use defusedxml to prevent XXE vulnerabilities (#9999)
Co-authored-by: Andoni A. <14891798+andoniaf@users.noreply.github.com>
2026-02-17 12:21:30 +01:00
Rubén De la Torre VicoandDaniel Barranquero f8d0be311c chore(azure): enhance metadata for keyvault service (#9621)
Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
2026-02-17 11:57:27 +01:00
Andoni A. 15557b9f6c test(image): add tests for SSRF, credential redaction, empty tokens, and DockerHub enumeration
- SSRF: reject file/ftp schemes, private/loopback/link-local IPs, accept public URLs
- Credential redaction: __getstate__ redacts password/token, properties still work
- Empty token guards: OCI bearer, DockerHub JWT, DockerHub registry token
- Narrow except: invalid UTF-8 base64 falls through correctly
- Fix namespace test to expect ImageRegistryCatalogError instead of AuthError
- Add registry_list_images=False to all Namespace objects missing it
- Add DockerHub enumeration integration test verifying repo:tag format
2026-02-17 11:40:31 +01:00
Andoni A. a692351f93 fix(image): harden registry adapter layer against SSRF, credential leaks, and edge cases
- Add SSRF protection for bearer token realm URLs (reject private/loopback IPs, non-http(s) schemes)
- Protect credentials from serialization via __getstate__ redaction and private attrs with properties
- Change missing DockerHub namespace exception from AuthError to CatalogError
- Add empty-token guards in OCI bearer flow and DockerHub JWT/registry token endpoints
- Narrow except Exception to except (ValueError, UnicodeDecodeError) in base64 decode
2026-02-17 11:25:38 +01:00
Andoni A. ed97fcd059 fix(image): add None guard, top-level import, and 401-retry to registry adapters
Add early return in _resolve_basic_credentials when password is None
to prevent TypeError on base64.b64decode. Move DockerHubAdapter import
from local scope to top-level in image_provider.py per PEP 8. Add
one-time 401 retry with token refresh in _authed_request to handle
per-repository-scoped bearer tokens on strict OCI registries.
2026-02-17 10:59:49 +01:00
Hugo Pereira BritoandAndoni A. 8438a94203 chore: enhance github documentation and ui placeholder (#9830)
Co-authored-by: Andoni A. <14891798+andoniaf@users.noreply.github.com>
2026-02-17 10:48:53 +01:00
Andoni A. b9060bebb0 style(image): apply black formatting to image provider files 2026-02-17 10:33:48 +01:00
Andoni A. e8ab331dff refactor(image): remove dead code from registry adapter layer
Remove unused detect_registry_type() function and _ECR_PATTERN constant
from factory.py, along with their corresponding tests. Move requests
import behind TYPE_CHECKING guard in oci_adapter.py and
dockerhub_adapter.py since it is only used for type annotations.
2026-02-17 10:17:46 +01:00
Andoni A. d9e451489d fix(image): harden registry adapter layer
- Fix shared dict mutation in ImageBaseException (thread-safety)
- Handle unexpected status codes in OCI adapter auth flow
- Force TLS verification for Docker Hub endpoints
- Add credential-safe __repr__ to RegistryAdapter
- Rename _next_page_url override to _next_tag_page_url in DockerHubAdapter
- Distinguish rate-limit from connection errors in retry logic
- Add type hints to all public adapter methods
- Remove unused imports in test files (flake8)
2026-02-17 10:01:35 +01:00
Pedro Martín e8c48b7827 feat(reporting): support CSA CCM PDF reports (#10088) 2026-02-17 09:48:45 +01:00
Andoni A. b00c76acf2 test(image): update mock patch targets after base class refactor
Update test patches from adapter-level to base-level module paths since
requests and time are now imported in base.py. Consolidate separate
requests.post/requests.get patches into requests.request since all HTTP
calls now go through _request_with_retry.
2026-02-17 09:41:57 +01:00
Andoni A. 46e55a3351 test(image): add --registry-list validation tests and factory comment
- Add test_registry_list_without_registry_fails: validates that
  --registry-list without --registry returns an error
- Add test_registry_list_with_registry_passes: validates the happy path
- Add clarifying comment in factory.py about ECR using OCI adapter
2026-02-17 09:39:52 +01:00
Andoni A. 103f71c215 fix(image): use correct singular/plural in registry listing output
Handle "1 repository" vs "2 repositories" and "1 image" vs "2 images"
in _print_registry_listing output.
2026-02-17 09:39:29 +01:00
Andoni A. 310a32e391 refactor(image): deduplicate retry logic into registry adapter base class
- Move _request_with_retry, _next_page_url, _MAX_RETRIES, _BACKOFF_BASE
  from OciRegistryAdapter and DockerHubAdapter into RegistryAdapter base
- Add context_label parameter to _request_with_retry for contextual
  error/warning messages (defaults to self.registry_url)
- Route _hub_login and _get_registry_token through retry logic
- Change 404 exception in _check_hub_response from ImageRegistryAuthError
  to ImageRegistryCatalogError (missing namespace is not an auth failure)
- Remove redundant time, requests imports from leaf adapters
2026-02-17 09:39:15 +01:00
Andoni Alonso 402b33516b Merge branch 'master' into feat/PROWLER-939-stage-2-registry-auth 2026-02-17 09:17:03 +01:00
Andoni A. 5e2ed6a37c docs(image): remove redundant version badges from subsections
All features ship in 5.19.0 with the provider; subsection badges are
unnecessary since the top-level Prowler CLI badge already covers it.
2026-02-17 09:10:06 +01:00
Andoni A. 8ef231faae docs(image): update docs and changelog for public Docker Hub support
- Add note about public namespace scanning without credentials to docs
- Update changelog entry to mention public Docker Hub support
2026-02-17 09:06:38 +01:00
Andoni A. 304fa25f25 feat(image): support public Docker Hub registry scan without credentials
- Use public /v2/repositories/{ns}/ endpoint when unauthenticated
- Fall back to namespace API when JWT is available for private repos
- Add test for unauthenticated public namespace listing
2026-02-17 08:43:01 +01:00
Andoni A. ffeaeb760e docs(image): document registry scan mode and --registry-list flag
Add Registry Scan Mode section covering --registry, --image-filter,
--tag-filter, --max-images, --registry-insecure, and the new
--registry-list flag for image discovery.
2026-02-17 08:02:41 +01:00
Andoni A. 876702fd22 feat(image): add --registry-list flag for image discovery
Add --registry-list flag that enumerates registry repositories and tags,
then prints a structured listing and exits without scanning. This helps
users discover available images before building --image-filter or
--tag-filter regexes.
2026-02-17 07:44:41 +01:00
Andoni A. 326def4a17 fix(image): handle Basic auth challenge and pre-encoded ECR credentials
- Detect Basic auth challenges (non-Bearer) in _ensure_auth()
- Decode base64-wrapped credentials from aws ecr get-authorization-token
- Add unit tests for credential resolution and Basic auth flow
2026-02-16 17:50:05 +01:00
Andoni A. aa284b8b24 test(image): add comprehensive registry scan mode unit tests
69 tests covering:
- Factory auto-detection (OCI, Docker Hub, ECR URL patterns)
- OCI adapter (auth flows, pagination, retry, error handling)
- Docker Hub adapter (namespace extraction, Hub API, token exchange)
- Argument validation (registry flags, Docker Hub namespace)
- Provider integration (enumeration, filtering, max-images, dedup)
2026-02-16 15:42:02 +01:00
Andoni A. ace36fe76e feat(image): add registry scan mode with OCI, Docker Hub, and ECR support
Add pluggable registry adapter pattern for enumerating and scanning all
container images in a private registry. Supports:
- Generic OCI registries (Harbor, GitLab, JFrog) via /v2/_catalog
- Docker Hub via Hub REST API with namespace-based enumeration
- AWS ECR via standard OCI endpoints with ECR auth token

New CLI flags: --registry, --image-filter, --tag-filter, --max-images,
--registry-insecure
2026-02-16 15:35:55 +01:00
Prowler Botandprowler-bot df8a7220ff feat(oraclecloud): Update commercial regions (#10082)
Co-authored-by: prowler-bot <179230569+prowler-bot@users.noreply.github.com>
2026-02-16 14:23:28 +01:00
Daniel Barranquero a106cdf4c9 fix: oci regions actions labels (#10083) 2026-02-16 14:23:17 +01:00
Daniel Barranquero a86f0b95bc fix(oci): update regions script to handle raw credentials (#10081) 2026-02-16 14:03:27 +01:00
Josema Camacho bb34f6cc3d refactor(api): remove graph_database and is_graph_database_deleted from AttackPathsScan (#10077) 2026-02-16 12:46:49 +01:00
Daniel Barranquero be516f1dfc feat(openstack): Add 7 New Compute Security Checks (#9944) 2026-02-16 11:46:48 +01:00