Skip to content

SBOM physical-audit "5 file" cap doesn't cap files per directory #254

Description

@squid-protocol

File: sbom_recorder.py
Labels: bug, performance, priority:low
pythonfor root, _, files in os.walk(pkg_path):
if scanned_files > 5:
break
for file in files:
...
scanned_files += 1
The break only evaluates between directories. A package with one flat directory of hundreds of files gets all of them scanned before the cap has a chance to fire, contradicting the "Max 5 core files" comment.
Fix: move the if scanned_files > 5: break check inside the inner for file in files loop too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended behavior or logic failure in the enginepriority: lowUI tweaks, documentation, and minor optimizations

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions