Skip to content

Implemented the requested logging improvements.#75

Merged
pgesek merged 5 commits into
SolDevelo:mainfrom
Natan-gal:patch-6
May 29, 2026
Merged

Implemented the requested logging improvements.#75
pgesek merged 5 commits into
SolDevelo:mainfrom
Natan-gal:patch-6

Conversation

@Natan-gal
Copy link
Copy Markdown
Contributor

InfraScan now:

logs all discovered Docker Compose and Kubernetes files before scanning,
shows the source file for each scanned image, e.g. Scanning image: nginx:1.27 (from docker-compose.yml).

@igor-soldev
Copy link
Copy Markdown
Member

The PR contains an indentation error (IndentationError) in docker_scout_scanner.py, which means the script does not run locally and it is not possible to verify the changes to the login process.

Request: before submitting a PR, it is always a good idea to run the changes locally and check that the code executes without any syntax errors.

@igor-soldev igor-soldev marked this pull request as draft May 21, 2026 09:34
@Natan-gal
Copy link
Copy Markdown
Contributor Author

The indentation issue has been fixed and I verified the changes locally.

I also added graceful handling for missing Docker Scout installations and improved fallback behavior to Grype to prevent scan failures.

findings = []
extra_recommendations = []
auth_failed = False
scanned_images = set() # Cache to avoid scanning same image multiple times
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

k8s_files = find_kubernetes_files(directory_path)

if not compose_files and not k8s_files:
return findings, extra_recommendations, False
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave this as a failsafe

@pgesek pgesek marked this pull request as ready for review May 29, 2026 08:47
@pgesek pgesek merged commit 245df09 into SolDevelo:main May 29, 2026
1 check passed
Sign up for free to join this conversation 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.

3 participants