Bump typescript from 5.9.3 to 6.0.3 in /sdk/node #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SCA | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| dependency-risk: | |
| name: Dependency risk | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: sdk/node/package-lock.json | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Install stable Rust | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| - name: Install audit tooling | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pip-audit | |
| cargo install cargo-deny --locked | |
| - name: Cargo deny | |
| run: cargo deny check advisories bans licenses sources | |
| - name: Build Python requirement set | |
| run: | | |
| python - <<'PY' > sca-python-requirements.txt | |
| import tomllib | |
| from pathlib import Path | |
| roots = [Path("sdk/python/pyproject.toml"), Path("generator/pyproject.toml")] | |
| seen = set() | |
| for root in roots: | |
| data = tomllib.loads(root.read_text()) | |
| for dep in data.get("project", {}).get("dependencies", []): | |
| lowered = dep.lower() | |
| if lowered == "agent-control-specification" or lowered.startswith("agent-control-specification["): | |
| continue | |
| if dep not in seen: | |
| seen.add(dep) | |
| print(dep) | |
| PY | |
| - name: pip-audit | |
| run: pip-audit -r sca-python-requirements.txt | |
| - name: npm audit | |
| working-directory: sdk/node | |
| run: | | |
| npm ci | |
| npm audit --audit-level=high | |
| - name: .NET vulnerable package audit | |
| run: | | |
| set -euo pipefail | |
| dotnet restore sdk/dotnet/AgentControlSpecification.sln | |
| dotnet list sdk/dotnet/AgentControlSpecification.sln package --vulnerable --include-transitive --format json > dotnet-vulnerabilities.json | |
| python - <<'PY' | |
| import json | |
| from pathlib import Path | |
| data = json.loads(Path("dotnet-vulnerabilities.json").read_text()) | |
| advisories = [] | |
| for project in data.get("projects", []): | |
| for framework in project.get("frameworks", []): | |
| for bucket in ("topLevelPackages", "transitivePackages"): | |
| for package in framework.get(bucket, []): | |
| if package.get("advisories"): | |
| advisories.append({ | |
| "project": project.get("path"), | |
| "package": package.get("id"), | |
| "advisories": package.get("advisories"), | |
| }) | |
| if advisories: | |
| raise SystemExit(f".NET vulnerable packages detected {advisories}") | |
| PY |