Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b0f24c2
setting up demo environment
Mar 31, 2023
822ad79
setting up demo environment
Mar 31, 2023
12d8c85
setting up demo environment
Mar 31, 2023
28c739a
setting up demo environment
Mar 31, 2023
48f476f
setting up demo environment
Mar 31, 2023
859bbb6
setting up demo environment
Mar 31, 2023
2f66cdc
setting up demo environment
Mar 31, 2023
746786e
setting up demo environment
Mar 31, 2023
003fb5f
setting up demo environment
Mar 31, 2023
38f84ed
setting up Qwiet benchmark
Apr 4, 2023
47f07f4
Code change for feature #1234
Apr 4, 2023
5b372b1
Code change for feature #1234
Apr 4, 2023
db418b0
setting up demo environment
Apr 4, 2023
5037155
Code change for feature #1234
Apr 4, 2023
718ca63
Setup demo environment
Apr 4, 2023
1758f33
Setup demo environment
Apr 4, 2023
78bddb8
Setup demo environment
Apr 4, 2023
9f7b418
Setup demo environment
Apr 4, 2023
5691c8f
Setup demo environment
Apr 5, 2023
09ed052
Setup demo environment
Apr 5, 2023
c20d5d3
Setup demo environment
Apr 5, 2023
9621a1f
Setup demo environment
Apr 5, 2023
d066bca
Setup demo environment
Apr 5, 2023
619a7a7
Setup demo environment
Apr 5, 2023
cd0cb9f
Setup demo environment
Apr 5, 2023
cd48d7d
Setup demo environment
Apr 5, 2023
d8350a0
Setup demo environment
Apr 5, 2023
bd860c5
Setup demo environment
Apr 5, 2023
181579c
Setup demo environment
Apr 5, 2023
087c9d7
Setup demo environment
Apr 5, 2023
23a27b7
Setup demo environment
Apr 5, 2023
dbbfbce
Setup demo environment
Apr 5, 2023
d488665
Setup demo environment
Apr 5, 2023
7fe6456
Setup demo environment
Apr 5, 2023
678a60e
Setup demo environment
Apr 5, 2023
3dccdff
Setup demo environment
Apr 5, 2023
856ab0a
Setup demo environment
Apr 5, 2023
695083b
Setup demo environment
Apr 5, 2023
f7eca19
Setup demo environment
Apr 5, 2023
510add7
Setup demo environment
Apr 5, 2023
9cff599
Setup demo environment
Apr 5, 2023
124b3b3
Setup demo environment
Apr 5, 2023
04ba7c7
Setup demo environment
Apr 5, 2023
ba0b11e
Setup demo environment
Apr 5, 2023
c19d76d
Setup demo environment
Apr 5, 2023
98b8f52
Setup demo environment
Apr 5, 2023
48a3268
Setup demo environment
Apr 5, 2023
26d3dea
Setup demo environment
Apr 5, 2023
f6bf515
Setup demo environment
Apr 5, 2023
ae42496
Setup demo environment
Apr 5, 2023
3136361
Setup demo environment
Apr 5, 2023
577e887
Setup demo environment
Apr 5, 2023
167849b
Setup demo environment
Apr 5, 2023
5b02739
Setup demo environment
Apr 5, 2023
4cf53a8
Integrate Qwiet in the workflow
Apr 5, 2023
eae21dc
Integrate Qwiet in the workflow
Apr 5, 2023
4cc8cce
Integrate Qwiet in the workflow
Apr 5, 2023
2ea57a0
Integrate Qwiet in the workflow
Apr 5, 2023
70fe13a
Integrate Qwiet in the workflow
Apr 5, 2023
333916e
Integrate Qwiet in the workflow
Apr 5, 2023
88de62d
Integrate Qwiet in the workflow
Apr 5, 2023
e494705
Integrate Qwiet in the workflow
Apr 5, 2023
4ea5448
Integrate Qwiet in the workflow
Apr 5, 2023
87601b0
Integrate Qwiet in the workflow
Apr 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,61 @@ version: 2.1
orbs:
node: circleci/node@4.7

commands:
validate:
parameters:
pr_num:
type: integer
default: 0
steps:
- run:
command: |
./sl check-analysis --v2 --app NodeGoatJS \
--report \
--github-api-base-url https://api.github.com/ \
--github-pr-user ${CIRCLE_PROJECT_USERNAME} \
--github-pr-repo ${CIRCLE_PROJECT_REPONAME} \
--github-pr-number <<parameters.pr_num>> \
--github-token ${GITHUB_TOKEN}
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
jobs:
sl_scan:
executor: node/default
steps:
- checkout
- run:
- run:
command: |
curl https://cdn.shiftleft.io/download/sl > ./sl && chmod a+rx ./sl #download Qwiet
./sl auth --diagnostic --token "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhcGl2NCIsImlhdCI6MTY4MDIzMDA0MCwiaXNzIjoiU2hpZnRMZWZ0Iiwib3JnSUQiOiIxYjRlZDRlMi03MWUwLTRiNmMtYjRlNy00OGE0YzQ4YWFiMTEiLCJ0b2tlbklEIjoiNTAzYTQ4ZjctMGFlZS00OGUzLWJlODYtZjlkNTdkYmQyMTJkIiwic2NvcGVzIjpbImV4dGVuZGVkIl19.U22UBjNpHxdzSVVozv3uUy88sO6zIxUqfD9lSAnYGdMpL2XwiYnODFxYAakNgPEvIB16sBUy_uxVodTVBwIy-WYcJT4c2PpylP7bkszNvoubPrXVjmJqmcDPTFIbZo3vHCKzwUhT12N-ASP-VmGnhttm_IgJ1rSwtjVmt_oIvD6KNyliBksx4FHF7Gk9AEXkmIRY-sguGuL6IDljBtV9LHHVkW5aETDK3m_ffvBUZYvZI0_tK7yhRuXyXhjSzAQp_wWjy8Ve8O9oDdWWcgxflqhW2lzB-4DWcALVRaaQnnrCg8__a3MKqdCnNxjITux2keBLDKXluQLFG5oWfyQBGw"
./sl analyze --wait --app NodeGoatJS --js
./sl check-analysis --v2 --app NodeGoatJS --config ./shiftleft.yml --target tag.branch=master
./sl check-analysis --v2 --app NodeGoatJS --config ./shiftleft.yml
- run: # print the name of the branch we're on
name: "What branch am I on?"
command: |
if [[ -z "$CIRCLE_PR_NUMBER" ]]; then
if [[ -z "$CI_PULL_REQUEST" ]]; then
URL="https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls?head=$CIRCLE_PROJECT_USERNAME:$CIRCLE_BRANCH"
RESULT="`curl -X GET -u $GITHUB_ACCESS_TOKEN:x-oauth-basic $URL | jq ".[0].url"`"
[[ "$RESULT" == 'null' ]] && CI_PULL_REQUEST='' || CI_PULL_REQUEST="${RESULT//\"}"
fi
CIRCLE_PR_NUMBER="$(basename "$CI_PULL_REQUEST")"
fi
echo ${CIRCLE_BRANCH}
echo ${CIRCLE_PROJECT_REPONAME}
echo ${CIRCLE_PR_NUMBER}
echo ${CIRCLE_PROJECT_USERNAME}
echo ${GITHUB_TOKEN}
- run:
name: "Validate build rules"
command: |
./sl check-analysis --v2 --app NodeGoatJS \
--report \
--github-api-base-url https://api.github.com/ \
--github-pr-user ${CIRCLE_PROJECT_USERNAME} \
--github-pr-repo ${CIRCLE_PROJECT_REPONAME} \
--github-pr-number 4 \
--github-token ${GITHUB_TOKEN}
workflows:
build_and_scan_and_test: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
Expand Down
1 change: 1 addition & 0 deletions app/routes/contributions.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function ContributionsHandler(db) {


//Fix for A1 -1 SSJS Injection attacks - uses alternate method to eval

/*
const preTax = parseInt(req.body.preTax);
const afterTax = parseInt(req.body.afterTax);
Expand Down
14 changes: 8 additions & 6 deletions shiftleft.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
source:
branch: main
scan: 1
scan: previous
# branch: main
build_rules:
- id: "Allow zero high SAST vulnerabilities"
finding_types:
- vuln
- secret
- oss_vuln
cvss_31_severity_ratings:
- high
- critical
threshold: 0
#- high
#- critical
#threshold: 0
options:
num_findings: 0
reachable: true
num_findings: 10