File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,17 @@ pipeline {
30
30
31
31
stage(' CodeQL Analysis' ) {
32
32
steps {
33
- sh ''' #!/bin/bash
34
- . venv/bin/activate
35
- echo "Base Ref (Target Branch): $CHANGE_TARGET"
36
- echo "Ref (Source Branch): $CHANGE_BRANCH"
37
-
38
- curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
39
-
40
- codeql-wrapper --verbose analyze ./monorepo --monorepo --upload-sarif --ref $CHANGE_BRANCH --base-ref $CHANGE_TARGET
41
- '''
33
+ withCredentials([string(credentialsId : ' PAT' , variable : ' GITHUB_TOKEN' )]) {
34
+ sh ''' #!/bin/bash
35
+ . venv/bin/activate
36
+ echo "Base Ref (Target Branch): $CHANGE_TARGET"
37
+ echo "Ref (Source Branch): $CHANGE_BRANCH"
38
+
39
+ curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
40
+
41
+ codeql-wrapper --verbose analyze ./monorepo --monorepo --upload-sarif --ref $CHANGE_BRANCH --base-ref $CHANGE_TARGET
42
+ '''
43
+ }
42
44
}
43
45
}
44
46
}
You can’t perform that action at this time.
0 commit comments