File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,28 @@ jobs:
113113 exit 1
114114 fi
115115
116+ sast :
117+ name : SAST (bandit)
118+ runs-on : ubuntu-latest
119+ steps :
120+ - uses : actions/checkout@v4
121+ - uses : astral-sh/setup-uv@v4
122+ with :
123+ version : " latest"
124+ - run : uv sync --all-extras
125+ - run : uv run bandit -r src/ -q
126+
127+ dep-audit :
128+ name : Dependency Audit (pip-audit)
129+ runs-on : ubuntu-latest
130+ steps :
131+ - uses : actions/checkout@v4
132+ - uses : astral-sh/setup-uv@v4
133+ with :
134+ version : " latest"
135+ - run : uv sync --all-extras
136+ - run : uv run pip-audit
137+
116138 secrets-scan :
117139 name : Secrets Scan
118140 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -64,4 +64,6 @@ dev-dependencies = [
6464 " python-multipart>=0.0.24" ,
6565 " uvicorn>=0.44.0" ,
6666 " flask>=3.0.0" ,
67+ " bandit>=1.9.4" ,
68+ " pip-audit>=2.10.0" ,
6769]
Original file line number Diff line number Diff line change 1212from typing import TYPE_CHECKING
1313
1414from agentwrit .agent import Agent
15+ from agentwrit .errors import AgentWritError
1516
1617if TYPE_CHECKING :
1718 from cryptography .hazmat .primitives .asymmetric .ed25519 import Ed25519PrivateKey
@@ -80,7 +81,8 @@ def orchestrate(
8081 agent_name = label or f"{ orch_id } /{ task_id } "
8182
8283 # The app JWT is required as Bearer auth for launch token creation.
83- assert self ._app ._session is not None
84+ if self ._app ._session is None :
85+ raise AgentWritError ("App not authenticated — call authenticate() first" )
8486 app_token = self ._app ._session .access_token
8587
8688 lt_response = self ._transport .request (
You can’t perform that action at this time.
0 commit comments