@soos-io/api-client
Advanced tools
Comparing version 1.0.16-pre.2 to 1.0.16
@@ -26,2 +26,4 @@ import FormData from "form-data"; | ||
toolVersion?: string | null; | ||
commandLine?: string | null; | ||
scanMode?: string | null; | ||
} | ||
@@ -168,3 +170,3 @@ interface ICreateScanResponse { | ||
constructor(apiKey: string, baseUri?: string); | ||
createScan({ clientId, projectName, commitHash, branch, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, scanType, appVersion, scriptVersion, contributingDeveloperAudit, toolName, toolVersion, }: ICreateScanRequest): Promise<ICreateScanResponse>; | ||
createScan({ clientId, projectName, commitHash, branch, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, scanType, appVersion, scriptVersion, contributingDeveloperAudit, toolName, toolVersion, commandLine, scanMode, }: ICreateScanRequest): Promise<ICreateScanResponse>; | ||
getSupportedScanFileFormats({ clientId, }: IGetSupportedScanFileFormatsRequest): Promise<IGetSupportedScanFileFormatsResponse>; | ||
@@ -171,0 +173,0 @@ uploadManifestFiles({ clientId, projectHash, analysisId, manifestFiles, hasMoreThanMaximumManifests, }: IUploadManifestFilesRequest): Promise<IUploadManifestFilesResponse>; |
@@ -23,3 +23,3 @@ "use strict"; | ||
} | ||
async createScan({ clientId, projectName, commitHash, branch, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, scanType, appVersion, scriptVersion, contributingDeveloperAudit, toolName, toolVersion, }) { | ||
async createScan({ clientId, projectName, commitHash, branch, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, scanType, appVersion, scriptVersion, contributingDeveloperAudit, toolName, toolVersion, commandLine, scanMode, }) { | ||
const response = await this.client.post(`clients/${clientId}/scan-types/${scanType}/scans`, { | ||
@@ -40,2 +40,4 @@ projectName: projectName, | ||
toolVersion: toolVersion, | ||
commandLine: commandLine, | ||
scanMode: scanMode, | ||
}); | ||
@@ -42,0 +44,0 @@ return response.data; |
@@ -66,2 +66,4 @@ import { FileMatchTypeEnum, HashAlgorithmEnum } from "./../enums"; | ||
toolVersion?: string | null; | ||
commandLine?: string | null; | ||
scanMode?: string | null; | ||
} | ||
@@ -87,3 +89,3 @@ interface IUpdateScanStatusParams { | ||
private logStatusMessage; | ||
setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, }: ISetupScanParams): Promise<ICreateScanResponse>; | ||
setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, commandLine, scanMode, }: ISetupScanParams): Promise<ICreateScanResponse>; | ||
startScan({ clientId, projectHash, analysisId, scanType, scanUrl, }: IStartScanParams): Promise<void>; | ||
@@ -90,0 +92,0 @@ waitForScanToFinish({ scanStatusUrl, scanUrl, scanType, isFirstCheckComplete, }: IWaitForScanToFinishParams): Promise<ScanStatus>; |
@@ -40,5 +40,2 @@ "use strict"; | ||
"TEAMCITY_BUILD_TRIGGEREDBY_USERNAME", | ||
"TEAMCITY.BUILD.TRIGGEREDBY.USERNAME", | ||
"vcsroot.username", | ||
"vcsroot_username", | ||
"TRAVIS_JOB_RESTARTED_BY", | ||
@@ -93,3 +90,3 @@ "SOOS_CONTRIBUTING_DEVELOPER", | ||
} | ||
async setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, }) { | ||
async setupScan({ clientId, projectName, branchName, commitHash, buildVersion, buildUri, branchUri, integrationType, operatingEnvironment, integrationName, appVersion, scriptVersion, contributingDeveloperAudit, scanType, toolName, toolVersion, commandLine, scanMode, }) { | ||
logging_1.soosLogger.info("Checking status..."); | ||
@@ -117,7 +114,2 @@ const applicationStatus = await this.userApiClient.getApplicationStatus(clientId); | ||
} | ||
contributingDeveloperAudit.push({ | ||
source: enums_2.ContributingDeveloperSource.EnvironmentVariable, | ||
sourceName: "tc-vcsroot.username", | ||
contributingDeveloperId: process.env.vcsroot_username ?? "", | ||
}); | ||
const result = await this.analysisApiClient.createScan({ | ||
@@ -140,2 +132,4 @@ clientId: clientId, | ||
toolVersion: toolVersion, | ||
commandLine: commandLine, | ||
scanMode: scanMode, | ||
}); | ||
@@ -142,0 +136,0 @@ logging_1.soosLogger.info(`Project Hash: ${result.projectHash}`); |
{ | ||
"name": "@soos-io/api-client", | ||
"version": "1.0.16-pre.2", | ||
"version": "1.0.16", | ||
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
323463
0
5