diff --git a/src/verinfast/agent.py b/src/verinfast/agent.py index 2949482..1c86228 100755 --- a/src/verinfast/agent.py +++ b/src/verinfast/agent.py @@ -458,6 +458,8 @@ def parseRepo(self, path: str, repo_name: str, branch: str = None): ] findings_success = False + if not self.config.dry: + self.log(msg=repo_name, tag="Scanning repository", display=True) try: with contextlib.redirect_stdout(io.StringIO()): semgrep_scan.scan(custom_args) diff --git a/tests/test_dry.py b/tests/test_dry.py index e6fc757..2e08c87 100644 --- a/tests/test_dry.py +++ b/tests/test_dry.py @@ -37,8 +37,13 @@ def test_no_config(self): assert get_url == "/report/uuid/9a6e8696-f93a-4402-a64e-342ccb37592b/CorsisCode", get_url # noqa: E501 agent.scan() assert Path(results_dir).exists() - files = os.listdir(results_dir) - assert len(files) == 1 + # Make sure there are no .json results files + results_path = Path(results_dir) + assert results_path.exists() + + # Check if there are any JSON files + json_files = list(results_path.glob("*.json")) + assert not json_files, f"Found JSON files: {json_files}" with open(agent.debug.file) as f: logText = f.read() assert "Error" not in logText