Skip to content

Commit db2dc6e

Browse files
committed
CodeQL scanning a path, Example
1 parent 5a884b7 commit db2dc6e

File tree

983 files changed

+129261
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

983 files changed

+129261
-2
lines changed

.DS_Store

6 KB
Binary file not shown.

.codeclimate.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: "2"
2+
plugins:
3+
fixme:
4+
enabled: true
5+
duplication:
6+
enabled: true
7+
checks:
8+
file-lines:
9+
config:
10+
threshold: 300
11+
method-lines:
12+
config:
13+
threshold: 30
14+
method-complexity:
15+
config:
16+
threshold: 7
17+
similar-code:
18+
enabled: false
19+
identical-code:
20+
enabled: false
21+
exclude_patterns:
22+
- '**/*conf.js'
23+
- 'Gruntfile.js'
24+
- 'data/datacreator.ts'
25+
- 'frontend/src/hacking-instructor/**/*.ts'
26+
- 'frontend/src/assets/private/*.js'
27+
- 'lib/logger.ts'
28+
- 'data/static/codefixes/**'

.dependabot/config.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: "javascript"
4+
directory: "/"
5+
update_schedule: "live"
6+
target_branch: "develop"
7+
default_reviewers:
8+
- "bkimminich"
9+
default_labels:
10+
- "dependencies"
11+
ignored_updates:
12+
- match:
13+
dependency_name: "express-jwt"
14+
version_requirement: "0.1.3"
15+
- match:
16+
dependency_name: "sanitize-html"
17+
version_requirement: "1.4.2"
18+
- match:
19+
dependency_name: "unzipper"
20+
version_requirement: "0.9.15"
21+
- match:
22+
dependency_name: "jsonwebtoken"
23+
version_requirement: "0.4.0"
24+
- package_manager: "javascript"
25+
directory: "/frontend"
26+
update_schedule: "live"
27+
target_branch: "develop"
28+
default_reviewers:
29+
- "bkimminich"
30+
default_labels:
31+
- "dependencies"

.devcontainer.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extensions": [
3+
"eg2.vscode-npm-script",
4+
"angular.ng-template",
5+
"dbaeumer.vscode-eslint",
6+
"stylelint.vscode-stylelint"
7+
],
8+
"settings": {
9+
"eslint.workingDirectories": [
10+
{ "mode": "auto" }
11+
]
12+
},
13+
"postCreateCommand": "export NG_CLI_ANALYTICS=ci && npm i -g @angular/cli && npm install"
14+
}

.dockerignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.git/
2+
monitoring/
3+
node_modules/
4+
screenshots/
5+
test/
6+
build/reports/
7+
dist/
8+
vagrant/
9+
logs/
10+
Dockerfile
11+
.npmrc
12+
13+
# Pattern is *not covered* by node_modules/ above no matter what IntelliJ says!
14+
frontend/node_modules/
15+
frontend/dist/

.eslintrc.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2014-2023 Bjoern Kimminich & the OWASP Juice Shop contributors.
3+
* SPDX-License-Identifier: MIT
4+
*/
5+
6+
module.exports = {
7+
extends: 'standard-with-typescript',
8+
env: {
9+
browser: true,
10+
node: true,
11+
jasmine: true,
12+
mocha: true,
13+
jest: true
14+
},
15+
globals: {
16+
Atomics: 'readonly',
17+
SharedArrayBuffer: 'readonly'
18+
},
19+
parserOptions: {
20+
ecmaVersion: 2018,
21+
project: './tsconfig.json'
22+
},
23+
ignorePatterns: [
24+
'app/private/**',
25+
'vagrant/**',
26+
'frontend/**',
27+
'data/static/codefixes/**',
28+
'dist/**'
29+
],
30+
overrides: [
31+
{
32+
files: ['**/*.ts'],
33+
parser: '@typescript-eslint/parser',
34+
rules: {
35+
'no-void': 'off', // conflicting with recommendation from @typescript-eslint/no-floating-promises
36+
// FIXME warnings below this line need to be checked and fixed. Line end comments below are number of findings per rule on 02.05.2022
37+
'@typescript-eslint/no-misused-promises': 'off', // 1
38+
'@typescript-eslint/explicit-function-return-type': 'off', // 197
39+
'@typescript-eslint/restrict-plus-operands': 'off', // 250
40+
'@typescript-eslint/strict-boolean-expressions': 'off', // 337
41+
'@typescript-eslint/restrict-template-expressions': 'off', // 395
42+
'@typescript-eslint/no-var-requires': 'off' // 509
43+
}
44+
}
45+
]
46+
}

.github/.DS_Store

6 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
paths:
2+
- lib/**
3+
4+
#paths-ignore:
5+
# - src/node_modules
6+
#- '**/*.test.js'

.github/workflows/codeql.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
##
12+
name: "CodeQL Code Scanning"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
18+
pull_request:
19+
branches: [ "main" ]
20+
21+
## Using an Env. variable as to define the path of the configuration file which contains the paths to scan.
22+
env:
23+
Path_to_Scan: ./.github/codeql_config/codeql-config.yml
24+
25+
jobs:
26+
CodeQL_Code_Scanning:
27+
name: Analyze
28+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
29+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
language: [ 'javascript', 'python' ]
39+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
40+
# Use only 'java' to analyze code written in Java, Kotlin or both#
41+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
42+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v3
47+
48+
# Initializes the CodeQL tools for scanning.
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v2
51+
with:
52+
languages: ${{ matrix.language }}
53+
queries: security-extended
54+
# If you wish to specify a path you can do so using this config file.
55+
config-file: ${{ env.Path_to_Scan }}
56+
57+
58+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
59+
# If this step fails, then you should remove it and run the build manually (see below)
60+
- name: Autobuild
61+
uses: github/codeql-action/autobuild@v2
62+
63+
64+
# ℹ️ Command-line programs to run using the OS shell.
65+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
66+
67+
# If the Autobuild fails above, remove it and uncomment the following three lines.
68+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
69+
70+
# - run: |
71+
# echo "Run, Build Application using script"
72+
# ./location_of_script_within_repo/buildscript.sh
73+
74+
- name: Perform CodeQL Analysis
75+
uses: github/codeql-action/analyze@v2
76+
with:
77+
category: "/language:${{matrix.language}}"
78+
79+
80+

.github/workflows/packs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# App
2+
node_modules/
3+
juiceshop.sqlite
4+
order_*.pdf
5+
app/
6+
!frontend/src/app
7+
uploads/complaints/*.*
8+
!uploads/complaints/.gitkeep
9+
ftp/legal.md
10+
package-lock.json
11+
i18n/*.json
12+
i18n/*.invalid
13+
!frontend/src/assets/i18n/*.json
14+
!data/static/i18n/*.json
15+
data/chatbot/*.*
16+
!data/chatbot/.gitkeep
17+
/data/juiceshop.sqlite-journal
18+
19+
# Build
20+
.nyc_output/
21+
.sass-cache/
22+
build/
23+
cache/
24+
dist/
25+
logs/
26+
vagrant/.vagrant/
27+
*.orig
28+
*.out
29+
*.log
30+
JSON
31+
JSON.map
32+
frontend/src/**/*.js
33+
34+
# IDEs
35+
.idea/
36+
.vscode/
37+
out/
38+
*.eml
39+
*.iml
40+
*.iws
41+
*.swp
42+
43+
# Branch ghpages
44+
assets/
45+
!frontend/src/assets/
46+
47+
# Custom configuration files
48+
config/*.yml
49+
!config/addo.yml
50+
!config/bodgeit.yml
51+
!config/ctf.yml
52+
!config/fbctf.yml
53+
!config/default.yml
54+
!config/juicebox.yml
55+
!config/quiet.yml
56+
!config/test.yml
57+
!config/7ms.yml
58+
!config/mozilla.yml
59+
!config/unsafe.yml
60+
!config/tutorial.yml
61+
!config/oss.yml

.imgbotconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ignoredFiles": [
3+
"frontend/src/assets/public/images/carousel/5.png",
4+
"frontend/src/assets/public/images/products/3d_keychain.jpg",
5+
"frontend/src/assets/public/images/uploads/favorite-hiking-place.png"
6+
]
7+
}

.mailmap

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Aashish683 <aashishsingh2907@gmail.com> Aashish Singh <30633088+Aashish683@users.noreply.github.com>
2+
Alejandro Saenz <alejandrosaenz117@gmail.com> Alejandro Saenz <Whamo12@users.noreply.github.com>
3+
Björn Kimminich <bjoern.kimminich@owasp.org> Bjoern Kimminich <bjoern.kimminich@gmx.de>
4+
Björn Kimminich <bjoern.kimminich@owasp.org> Bjoern Kimminich <bjoern.kimminich@kuehne-nagel.com>
5+
Björn Kimminich <bjoern.kimminich@owasp.org> Björn Kimminich <bjoern.kimminich@gmx.de>
6+
Björn Kimminich <bjoern.kimminich@owasp.org> Björn Kimminich <bjoern.kimminich@kuehne-nagel.com>
7+
Björn Kimminich <bjoern.kimminich@owasp.org> bjoern.kimminich <bjoern.kimminich@kuehne-nagel.com>
8+
Björn Kimminich <bjoern.kimminich@owasp.org> Björn Kimminich <github.com@kimminich.de>
9+
CaptainFreak <patelshoeb4@gmail.com> CaptainFreak <captainfreak@localhost.localdomain>
10+
Jannik Hollenbach <Jannik.Hollenbach@iteratec.de> J12934 <13718901+J12934@users.noreply.github.com>
11+
Jannik Hollenbach <Jannik.Hollenbach@iteratec.de> Jannik Hollenbach <13718901+J12934@users.noreply.github.com>
12+
Jannik Hollenbach <Jannik.Hollenbach@iteratec.de> Jannik Hollenbach <jannik.hollenbach@iteratec.de>
13+
Jannik Hollenbach <Jannik.Hollenbach@iteratec.de> Jannik Hollenbach <jannik@hollenbach.de>
14+
Jannik Hollenbach <Jannik.Hollenbach@iteratec.de> Jannik Hollenbach <jannik.hollenbach@iteratec.com>
15+
JamesCullum <5477111+JamesCullum@users.noreply.github.com> JamesCullum <JamesCullum@users.noreply.github.com>
16+
MarcRler <marc.ruettler@live.de> Marc Rüttler <Marc.ruettler@live.de>
17+
MarcRler <marc.ruettler@live.de> MarcRler <mr144@hdm-stuttgart.de>
18+
Nat McHugh <nmchugh@inviqa.com> Nathaniel McHugh <nat@fishtrap.co.uk>
19+
Simon Basset <simon.basset.pro@gmail.com> Simon Basset <simon.basset@gmail.com>
20+
Supratik Das <rick.das08@gmail.com> Supratik Das <30755453+supra08@users.noreply.github.com>
21+
Timo Pagel <github@timo-pagel.de> Timo Pagel <gitlab@timo-pagel.de>
22+
Timo Pagel <github@timo-pagel.de> Timo Pagel <tpagel@fhunii-media.com>
23+
Timo Pagel <github@timo-pagel.de> tpagel <timo.pagel@fhunii-media.com>
24+
Timo Pagel <github@timo-pagel.de> wurstbrot <github@timo-pagel.de>
25+
Viktor Lindström <viktor.lindstrm@gmail.com> ViktorLindstrm <viktor.lindstrm@gmail.com>
26+
aaryan10 <aaryanbudhiraja2@gmail.com> Aaryan Budhiraja <31697449+aaryan01@users.noreply.github.com>
27+
agrawalarpit14 <agrawal.arpit14@gmail.com> Arpit Agrawal <35000671+agrawalarpit14@users.noreply.github.com>
28+
greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com> greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
29+
omerlh <omerl@soluto.com> Omer Levi Hevroni <omerl@soluto.com>
30+
Scar26 <mmatty26@gmail.com> Mohit Sharma <41830515+Scar26@users.noreply.github.com>

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.zap/rules.tsv

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
10109 IGNORE (Modern Web Application)
2+
10035 IGNORE (Strict-Transport-Security Header Not Set)
3+
10098 IGNORE (Cross-Domain Misconfiguration)
4+
10017 IGNORE (Cross-Domain JavaScript Source File Inclusion)
5+
10096 IGNORE (Timestamp Disclosure - Unix)
6+
10015 IGNORE (Incomplete or No Cache-control and Pragma HTTP Header Set)
7+
10038 IGNORE (Content Security Policy (CSP) Header Not Set)
8+
10099 IGNORE (Source Code Disclosure - Java)
9+
10027 IGNORE (Information Disclosure - Suspicious Comments)
10+
10094 IGNORE (Base64 Disclosure)
11+
10063 IGNORE (Feature Policy Header Not Set)
12+
10049 IGNORE (Storable but Non-Cacheable Content)
13+
10049 IGNORE (Non-Storable Content)
14+
10110 IGNORE (Dangerous JS Functions)
15+
90004 IGNORE (Insufficient Site Isolation Against Spectre Vulnerability)

0 commit comments

Comments
 (0)