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

perf(imports): reduce Sonar issue collection requests (#2208)

Michael D'Angeloe0f1a3fbcece
diff --git a/sdk/typescript/src/sonar-collector.ts b/sdk/typescript/src/sonar-collector.ts
index e4377d401..6c6f5c523 100644
--- a/sdk/typescript/src/sonar-collector.ts
+++ b/sdk/typescript/src/sonar-collector.ts
@@ -472,7 +472,7 @@ export async function collectSonarIssues(
componentKeys: project,
impactSoftwareQualities: "SECURITY",
additionalFields: "rules",
- ps: "100",
+ ps: "500",
});
if (branch !== undefined) query.set("branch", branch);
if (pullRequest !== undefined) query.set("pullRequest", pullRequest);
diff --git a/sdk/typescript/tests-ts/sonar-collector.test.ts b/sdk/typescript/tests-ts/sonar-collector.test.ts
index a69a8bcd0..8aff78e21 100644
--- a/sdk/typescript/tests-ts/sonar-collector.test.ts
+++ b/sdk/typescript/tests-ts/sonar-collector.test.ts
@@ -204,6 +204,7 @@ test("uses the signed-in CLI and a verified checkout binding, retaining all secu
expect(query.get("componentKeys")).toBe(project);
expect(query.get("branch")).toBe(branch);
expect(query.get("impactSoftwareQualities")).toBe("SECURITY");
+ expect(query.get("ps")).toBe("500");
expect(query.get("additionalFields")).toBe("rules");
expect(query.get("issueStatuses")).toBe("OPEN,CONFIRMED");
}
@@ -248,7 +249,7 @@ test("collects the exact issue keys and PR selected in the plugin handoff", asyn
const largeSelection = Array.from(
{ length: 2_000 },
- (_, index) => "example-issue-" + index,
+ (_, index) => "issue-" + index,
);
function exactIssuePage(