Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

ci(plugin): align portable Ruff checks (#770)

soyeon-oaid4873c47d99d
diff --git a/plugins/codex-security/pyproject.toml b/plugins/codex-security/pyproject.toml
index ae53a7b2b..0c9942c80 100644
--- a/plugins/codex-security/pyproject.toml
+++ b/plugins/codex-security/pyproject.toml
@@ -22,7 +22,175 @@ required-version = "==0.16.1"
target-version = "py312"
[tool.ruff.lint]
-select = ["I"]
+select = [
+ "E",
+ "F",
+ "W",
+ "B",
+ "C4",
+ "PIE",
+ "NPY",
+ "PLE",
+ "I",
+ "DTZ003",
+ "DTZ004",
+ "G010",
+ "PLW0120",
+ "PLW0129",
+ "PLW0131",
+ "PLW0133",
+ "PLW0177",
+ "PLW0211",
+ "PLW0604",
+ "PLW0711",
+ "PLW1509",
+ "PLW2101",
+ "SIM101",
+ "SIM110",
+ "SIM201",
+ "SIM202",
+ "SIM210",
+ "SIM211",
+ "SIM222",
+ "SIM223",
+ "S506",
+ "RET501",
+ "RET502",
+ "RUF006",
+ "RUF007",
+ "RUF008",
+ "RUF013",
+ "RUF016",
+ "RUF017",
+ "RUF019",
+ "RUF020",
+ "RUF030",
+ "RUF032",
+ "RUF034",
+ "RUF055",
+ "RUF060",
+ "RUF061",
+ "RUF066",
+ "RUF072",
+ "RUF102",
+ "RUF200",
+ "COM818",
+ "COM819",
+ "PYI001",
+ "PYI002",
+ "PYI003",
+ "PYI004",
+ "PYI005",
+ "PYI006",
+ "PYI007",
+ "PYI008",
+ "PYI009",
+ "PYI010",
+ "PYI011",
+ "PYI012",
+ "PYI013",
+ "PYI014",
+ "PYI015",
+ "PYI016",
+ "PYI017",
+ "PYI018",
+ "PYI019",
+ "PYI024",
+ "PYI025",
+ "PYI026",
+ "PYI029",
+ "PYI030",
+ "PYI032",
+ "PYI033",
+ "PYI035",
+ "PYI042",
+ "PYI043",
+ "PYI044",
+ "PYI045",
+ "PYI046",
+ "PYI047",
+ "PYI048",
+ "PYI049",
+ "PYI050",
+ "PYI051",
+ "PYI052",
+ "PYI053",
+ "PYI054",
+ "PYI056",
+ "PYI057",
+ "PYI058",
+ "PYI059",
+ "PYI062",
+ "PYI063",
+ "PYI066",
+ "PERF102",
+ "PGH005",
+ "RUF024",
+ "YTT201",
+ "YTT203",
+ "YTT204",
+ "UP001",
+ "UP003",
+ "UP004",
+ "UP006",
+ "UP007",
+ "UP018",
+ "UP028",
+ "UP034",
+ "UP045",
+ "UP051",
+ "FURB132",
+ "FURB148",
+ "FURB162",
+ "FURB163",
+ "FURB171",
+ "FURB181",
+ "FURB192",
+ "ISC004",
+ "ASYNC210",
+ "ASYNC212",
+ "ASYNC251",
+ "TID251",
+ "PT008",
+ "PT010",
+ "PT012",
+ "PT014",
+ "TC005",
+]
+ignore = [
+ "B905",
+ "E2",
+ "E3",
+ "E402",
+ "E501",
+ "E701",
+ "E711",
+ "E731",
+ "E741",
+ "B011",
+ "B903",
+ "C408",
+ "C409",
+ "C419",
+ "C420",
+ "UP035",
+ "NPY002",
+ "PIE790",
+ "RUF105",
+ "RUF201",
+ "SIM108",
+ "ASYNC109",
+ "ASYNC230",
+]
+preview = true
+
+[tool.ruff.lint.per-file-ignores]
+"__init__.py" = ["F401", "F403"]
+"**/test_*.py" = ["F811"]
+"conftest.py" = ["F811"]
+
+[tool.ruff.lint.isort]
+detect-same-package = false
[tool.setuptools.packages.find]
include = []
diff --git a/plugins/codex-security/tests/test_windows_report_e2e.py b/plugins/codex-security/tests/test_windows_report_e2e.py
index d00d93439..562f9ac66 100644
--- a/plugins/codex-security/tests/test_windows_report_e2e.py
+++ b/plugins/codex-security/tests/test_windows_report_e2e.py
@@ -12,7 +12,6 @@ from unittest import mock
from workbench_test_support import (
SCRIPT,
create_saved_workspace,
- run_workbench,
start_delivered_scan,
write_completed_contract,
)
diff --git a/plugins/codex-security/tests/test_workbench_scan_history.py b/plugins/codex-security/tests/test_workbench_scan_history.py
index 1fca47717..599e458a6 100644
--- a/plugins/codex-security/tests/test_workbench_scan_history.py
+++ b/plugins/codex-security/tests/test_workbench_scan_history.py
@@ -11,7 +11,7 @@ import uuid
from pathlib import Path
from typing import Any
-from test_workbench_db import HEAD_CHANGED_WARNING, create_saved_workspace
+from test_workbench_db import HEAD_CHANGED_WARNING
from workbench_test_support import (
initialize_git_repository,
mark_deep_coordinator_succeeded,