Skip to content

Commit

Permalink
fix: pass org to code-client
Browse files Browse the repository at this point in the history
  • Loading branch information
patricia-v committed Feb 21, 2023
1 parent ab5d579 commit d4659ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@sentry/node": "^7.34.0",
"@snyk/cli-interface": "2.11.0",
"@snyk/cloud-config-parser": "^1.14.5",
"@snyk/code-client": "^4.16.1",
"@snyk/code-client": "^4.16.2",
"@snyk/dep-graph": "^1.27.1",
"@snyk/docker-registry-v2-client": "^2.7.3",
"@snyk/fix": "file:packages/snyk-fix",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/plugins/sast/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ async function getCodeAnalysis(
? sastSettings.localCodeEngine.url
: getCodeClientProxyUrl();

const org = sastSettings.org;

// TODO(james) This mirrors the implementation in request.ts and we need to use this for deeproxy calls
// This ensures we support lowercase http(s)_proxy values as well
// The weird IF around it ensures we don't create an envvar with
Expand All @@ -94,12 +96,14 @@ async function getCodeAnalysis(
const severity = options.severityThreshold
? severityToAnalysisSeverity(options.severityThreshold)
: AnalysisSeverity.info;

const result = await analyzeFolders({
connection: {
baseURL,
sessionToken,
source,
requestId,
org,
},
analysisOptions: { severity },
fileOptions: { paths: [root] },
Expand Down

0 comments on commit d4659ed

Please sign in to comment.