Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install detect-secrets
run: pip install detect-secrets pytest pytest-asyncio
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 Info: pip install step on line 36 is now dead code

The step pip install detect-secrets pytest pytest-asyncio installs packages into the system Python environment, but the subsequent uv run pytest command creates/uses its own managed virtual environment based on pyproject.toml. Packages installed via pip are invisible to uv run. Since detect-secrets>=1.4 is already declared in pyproject.toml:85 and pyproject.toml:137, uv run will install it from the project dependencies. The pip install step should either be removed (if switching fully to uv run) or the command should revert to bare pytest (if keeping the lightweight approach).

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

- name: Run detect-secrets baseline check
run: pytest tests/architecture/test_antipatterns.py::test_no_hardcoded_secrets -q --noconftest -o "addopts=" -o "filterwarnings=" -o "timeout=0"
run: uv run pytest tests/architecture/test_antipatterns.py::test_no_hardcoded_secrets -q -o "addopts=" -o "filterwarnings=" -o "timeout=0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Install uv before running the security scan

In the detect-secrets job, the only setup before this command is actions/setup-python plus a pip install; unlike the later pip-audit and bandit jobs, it never runs the repo's ./.github/actions/setup-python-uv action that installs uv. On ubuntu-latest this leaves no guaranteed uv executable, so this security job can fail with uv: command not found before the secret scan runs. Either keep using python -m pytest with the pip-installed tools or add the uv setup step here as well.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 detect-secrets CI job uses uv run without installing uv

The detect-secrets job was changed from pytest ... to uv run pytest ..., but unlike every other job in this repo that uses uv run (e.g., pip-audit and bandit at lines 48–50 and 64–66), this job does not install uv. It only runs actions/setup-python (line 32), whereas the other jobs use the composite action ./.github/actions/setup-python-uv which explicitly installs uv via astral-sh/setup-uv@v7 (.github/actions/setup-python-uv/action.yml:41). The pip install detect-secrets pytest pytest-asyncio step on line 36 also becomes dead code, since uv run manages its own project environment and won't use pip-installed packages.

Prompt for agents
The detect-secrets job at .github/workflows/security.yml uses 'uv run pytest' (line 38) but does not install uv anywhere. Every other job in this file that uses 'uv run' first calls the composite action './.github/actions/setup-python-uv' which installs uv via 'astral-sh/setup-uv@v7'. There are two possible fixes:

1. Switch the detect-secrets job to also use the setup-python-uv composite action (like the pip-audit and bandit jobs do) and remove the pip install step, since uv will handle all dependencies from pyproject.toml. This would also make conftest loading work (since removing --noconftest is fine when all project deps are available).

2. Revert to the old approach: use bare 'pytest' (not 'uv run pytest') with 'pip install detect-secrets pytest pytest-asyncio' and restore the '--noconftest' flag to keep the job lightweight and self-contained.

Option 1 is more consistent with the rest of the workflow but makes the job heavier. Option 2 preserves the original lightweight intent.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚩 --noconftest removal changes test fixture loading behavior in CI

The old detect-secrets command included --noconftest which prevented pytest from loading any conftest.py files. This was important because the lightweight pip install detect-secrets pytest pytest-asyncio step didn't install the full project dependencies needed by tests/conftest.py (which imports tests.helpers.vcr_config, tests.helpers.metadata_fixtures, etc.). By removing --noconftest, the new command will attempt to load tests/conftest.py and tests/architecture/conftest.py, which require many project dependencies. If the intent is to use uv run (which sets up the full project environment), this is fine. But if the fallback is to revert to bare pytest, then --noconftest must be restored to avoid import failures.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/security.yml"

echo "=== File head/tail context ==="
python3 - <<'PY'
import itertools
path = ".github/workflows/security.yml"
with open(path, "r", encoding="utf-8") as f:
    lines = f.readlines()
print("Total lines:", len(lines))
print("---- Lines 1-120 ----")
for i in range(min(120, len(lines))):
    print(f"{i+1:4d}:{lines[i].rstrip()}")
print("---- Lines near 38 (30-60) ----")
for i in range(30, min(60, len(lines))):
    print(f"{i+1:4d}:{lines[i].rstrip()}")
print("---- Lines near end (last 80) ----")
start = max(1, len(lines)-80)
for i in range(start-1, len(lines)):
    print(f"{i+1:4d}:{lines[i].rstrip()}")
PY

echo
echo "=== Search for uv in this workflow ==="
rg -n --no-heading "uv( |$)|setup-python-uv|pip install uv|actions/setup-python|detect-secrets" "$FILE" || true

echo
echo "=== Search for setup action used in other jobs ==="
rg -n --no-heading "\\./\\.github/actions/" "$FILE" || true

Repository: SatoryKono/BioactivityDataAcquisition

Length of output: 7321


🏁 Script executed:

#!/bin/bash
set -euo pipefail

ls -R .github/actions/setup-python-uv || true
echo "---- action.yml (or equivalent) ----"
find .github/actions/setup-python-uv -maxdepth 2 -type f -name "action.yml" -o -name "action.yaml" -o -name "Dockerfile" -o -name "README.md" -o -name "*.sh" -o -name "*.yml" -o -name "*.yaml" | sort | sed 's/^/FILE: /'
echo
for f in $(find .github/actions/setup-python-uv -type f -maxdepth 4 | sort); do
  echo "==== $f ===="
  wc -l "$f"
  sed -n '1,200p' "$f"
done

Repository: SatoryKono/BioactivityDataAcquisition

Length of output: 3283


Install uv in the detect-secrets job before using uv run.

The detect-secrets step runs uv run pytest ... but that job only sets up Python and installs detect-secrets via pip; it never installs uv. Other jobs install uv via ./.github/actions/setup-python-uv (which uses astral-sh/setup-uv@v7). Add the same setup-python-uv composite action (or an astral-sh/setup-uv@v7 step) before line 38.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/security.yml at line 38, The detect-secrets job currently
runs the command "uv run pytest
tests/architecture/test_antipatterns.py::test_no_hardcoded_secrets -q -o
"addopts=" -o "filterwarnings=" -o "timeout=0"" but never installs the "uv"
tool; add the same UV setup step used by other jobs (either the local composite
action "./.github/actions/setup-python-uv" or the external action
"astral-sh/setup-uv@v7") before the run step so that "uv" is available to the
detect-secrets job.


pip-audit:
runs-on: ubuntu-latest
Expand Down
18 changes: 0 additions & 18 deletions Dockerfile.gemini

This file was deleted.

19 changes: 0 additions & 19 deletions conftest.py

This file was deleted.

29 changes: 0 additions & 29 deletions docker-compose.gemini.yml

This file was deleted.

Binary file not shown.
20 changes: 0 additions & 20 deletions reports/test-swarm/SWARM-001/00-swarm-plan.md

This file was deleted.

154 changes: 0 additions & 154 deletions reports/test-swarm/SWARM-001/FINAL-REPORT.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading