Skip to content

Commit 4ed041b

Browse files
committed
chore: update isCI() checks
1 parent c10fa8f commit 4ed041b

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

cliv2/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/snyk/cli-extension-sbom v0.0.0-20260109124810-cfdd074f8eeb
2020
github.com/snyk/container-cli v0.0.0-20250321132345-1e2e01681dd7
2121
github.com/snyk/error-catalog-golang-public v0.0.0-20260108110943-21ad0c940c14
22-
github.com/snyk/go-application-framework v0.0.0-20260114131314-54a8d6e79484
22+
github.com/snyk/go-application-framework v0.0.0-20260119153851-af9399a70578
2323
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65
2424
github.com/snyk/snyk-iac-capture v0.6.5
2525
github.com/snyk/snyk-ls v0.0.0-20260113102244-36303931affc

cliv2/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ github.com/snyk/dep-graph/go v0.0.0-20251219134535-fcb262dc6d25 h1:dwJ4Kdp4c5aaW
544544
github.com/snyk/dep-graph/go v0.0.0-20251219134535-fcb262dc6d25/go.mod h1:hTr91da/4ze2nk9q6ZW1BmfM2Z8rLUZSEZ3kK+6WGpc=
545545
github.com/snyk/error-catalog-golang-public v0.0.0-20260108110943-21ad0c940c14 h1:R74dgtKtcrIOG/349YDV8arH7D09pob3lAcJc290FqI=
546546
github.com/snyk/error-catalog-golang-public v0.0.0-20260108110943-21ad0c940c14/go.mod h1:Ytttq7Pw4vOCu9NtRQaOeDU2dhBYUyNBe6kX4+nIIQ4=
547-
github.com/snyk/go-application-framework v0.0.0-20260114131314-54a8d6e79484 h1:+1iE5APVe0ZeJncqQXc23y7FzPScABMHhCPQAqt276M=
548-
github.com/snyk/go-application-framework v0.0.0-20260114131314-54a8d6e79484/go.mod h1:LPR080GrK2jqNN9/hgVwKkXTVS3BlvwqmTN60lX5wdA=
547+
github.com/snyk/go-application-framework v0.0.0-20260119153851-af9399a70578 h1:raWhxHS1JpSSNNvZyv7jhnf1IfJlYd7mLBxrS1CWx9k=
548+
github.com/snyk/go-application-framework v0.0.0-20260119153851-af9399a70578/go.mod h1:LPR080GrK2jqNN9/hgVwKkXTVS3BlvwqmTN60lX5wdA=
549549
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 h1:CEQuYv0Go6MEyRCD3YjLYM2u3Oxkx8GpCpFBd4rUTUk=
550550
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65/go.mod h1:88KbbvGYlmLgee4OcQ19yr0bNpXpOr2kciOthaSzCAg=
551551
github.com/snyk/policy-engine v1.1.2 h1:BYWigTxPjiQer4m2jYhO623KmGdmmzA3S60k9AJPT+Q=

src/lib/is-ci.ts

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
export const ciEnvs = new Set([
2-
'SNYK_CI',
3-
'CI',
4-
'CONTINUOUS_INTEGRATION',
2+
'AZURE_PIPELINES',
3+
'bamboo.buildKey',
4+
'BITBUCKET_PIPE_STEP_RUN_UUID',
55
'BUILD_ID',
66
'BUILD_NUMBER',
7-
'TEAMCITY_VERSION',
8-
'TRAVIS',
7+
'BUILD_TAG', // Jenkins/Hudson - A string of the format jenkins-${JOB_NAME}-${BUILD_NUMBER}
8+
'BUILDKITE',
9+
'BUILDKITE_BUILD_ID', // Buildkite - The unique ID of the build
10+
'CI',
11+
'CI_BUILD_ID', // Common CI indicator
12+
'CI_COMMIT_SHA', // Common CI indicator
13+
'CI_JOB_ID', // Common CI indicator
14+
'CI_REPOSITORY_URL', // Common CI indicator
15+
'CI_SERVER_NAME', // Common CI indicator
16+
'CIRCLE_WORKFLOW_ID', // CircleCI - A unique ID for the entire workflow
917
'CIRCLECI',
10-
'JENKINS_URL',
18+
'CODEBUILD', // AWS CodeBuild
19+
'CONTINUOUS_INTEGRATION',
20+
'DRONE',
21+
'GITHUB_ACTIONS',
22+
'GITLAB_CI',
23+
'GOCD_SERVER_HOST',
1124
'HUDSON_URL',
12-
'bamboo.buildKey',
25+
'JENKINS_URL',
26+
'NETLIFY',
27+
'NOW_BUILD', // Vercel (Legacy)
1328
'PHPCI',
14-
'GOCD_SERVER_HOST',
15-
'BUILDKITE',
16-
'TF_BUILD',
29+
'SEMAPHORE',
30+
'SNYK_CI',
1731
'SYSTEM_TEAMFOUNDATIONSERVERURI', // for Azure DevOps Pipelines
32+
'SYSTEM_TEAMPROJECTID', // Azure DevOps Pipelines - ID of the ADO project
33+
'TEAMCITY_VERSION',
34+
'TF_BUILD',
35+
'TRAVIS',
36+
'TRAVIS_PULL_REQUEST', // Travis CI - The PR # (false if not a PR build)
37+
'VERCEL',
1838
]);
1939

2040
export function isCI(): boolean {

0 commit comments

Comments
 (0)