Skip to content

Commit 157a4a2

Browse files
author
thyldrm
committed
fix(ci): fix includeLogs query param type issue
- Remove includeLogs param when false (backend defaults to false) - Only send includeLogs=true when explicitly needed - Prevents string-to-boolean type conversion error in axios GET params Fixes: 400 validation error - Expected boolean, received string Version: 1.12.3 → 1.12.4
1 parent 8c15c43 commit 157a4a2

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codethreat/appsec-cli",
3-
"version": "1.12.3",
3+
"version": "1.12.4",
44
"description": "CodeThreat AppSec CLI for CI/CD integration and automated security scanning",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/lib/api-client.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,15 @@ export class CodeThreatApiClient {
281281
* Get scan status
282282
*/
283283
async getScanStatus(scanId: string, includeLogs = false): Promise<ScanStatusResponse> {
284+
// Build query params
285+
const params: any = {};
286+
287+
// Only add includeLogs if true (backend defaults to false)
288+
if (includeLogs) {
289+
params.includeLogs = true;
290+
}
291+
284292
// Include organizationSlug if available
285-
const params: any = { includeLogs };
286293
if (this.config.organizationSlug || process.env.CT_ORG_SLUG) {
287294
params.organizationSlug = this.config.organizationSlug || process.env.CT_ORG_SLUG;
288295
}

0 commit comments

Comments
 (0)