Skip to content

Commit 6d5e3bd

Browse files
authored
Merge pull request juice-shop#2530 from juice-shop/angular17
Merge Angular17 into develop
2 parents b386acf + 427ffde commit 6d5e3bd

311 files changed

Lines changed: 5310 additions & 3271 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ module.exports = {
3737
// FIXME warnings below this line need to be checked and fixed.
3838
'@typescript-eslint/explicit-function-return-type': 'off',
3939
'@typescript-eslint/strict-boolean-expressions': 'off',
40-
'@typescript-eslint/no-var-requires': 'off'
40+
'@typescript-eslint/no-var-requires': 'off',
41+
'@typescript-eslint/no-misused-promises': 'off'
4142
}
4243
}
4344
]

.github/workflows/ci.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ on:
1919
- 'frontend/src/assets/i18n/*.json'
2020
env:
2121
NODE_DEFAULT_VERSION: 20
22-
ANGULAR_CLI_VERSION: 17
2322
CYCLONEDX_NPM_VERSION: '^1.12.0'
23+
NODE_OPTIONS: "--max_old_space_size=4096"
2424
jobs:
2525
lint:
2626
runs-on: ubuntu-latest
@@ -31,8 +31,6 @@ jobs:
3131
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
3232
with:
3333
node-version: ${{ env.NODE_DEFAULT_VERSION }}
34-
- name: "Install CLI tools"
35-
run: npm install -g @angular/cli@$ANGULAR_CLI_VERSION
3634
- name: "Install application minimalistically"
3735
run: |
3836
npm install --ignore-scripts
@@ -63,8 +61,6 @@ jobs:
6361
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
6462
with:
6563
node-version: ${{ env.NODE_DEFAULT_VERSION }}
66-
- name: "Install CLI tools"
67-
run: npm install -g @angular/cli@$ANGULAR_CLI_VERSION
6864
- name: "Install application"
6965
run: npm install
7066
- name: "Check coding challenges for accidental code discrepancies"
@@ -84,9 +80,6 @@ jobs:
8480
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
8581
with:
8682
node-version: ${{ matrix.node-version }}
87-
- name: "Install CLI tools"
88-
if: github.repository == 'juice-shop/juice-shop' || (github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '20')
89-
run: npm install -g @angular/cli@$ANGULAR_CLI_VERSION
9083
- name: "Install application"
9184
if: github.repository == 'juice-shop/juice-shop' || (github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '20')
9285
run: npm install
@@ -124,9 +117,6 @@ jobs:
124117
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
125118
with:
126119
node-version: ${{ matrix.node-version }}
127-
- name: "Install CLI tools"
128-
if: github.repository == 'juice-shop/juice-shop' || (github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '20')
129-
run: npm install -g @angular/cli@$ANGULAR_CLI_VERSION
130120
- name: "Install application"
131121
if: github.repository == 'juice-shop/juice-shop' || (github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '20')
132122
run: npm install
@@ -185,8 +175,6 @@ jobs:
185175
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
186176
with:
187177
node-version: ${{ env.NODE_DEFAULT_VERSION }}
188-
- name: "Install CLI tools"
189-
run: npm install -g @angular/cli@$ANGULAR_CLI_VERSION
190178
- name: "Install application"
191179
if: github.repository == 'juice-shop/juice-shop' || (github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '20')
192180
run: npm install
@@ -264,7 +252,6 @@ jobs:
264252
node-version: ${{ env.NODE_DEFAULT_VERSION }}
265253
- name: "Install CLI tools"
266254
run: |
267-
npm install -g @angular/cli@$ANGULAR_CLI_VERSION
268255
npm install -g @cyclonedx/cyclonedx-npm@$CYCLONEDX_NPM_VERSION
269256
npm install -g grunt-cli
270257
- name: "Set packaging options for Grunt"
@@ -333,15 +320,15 @@ jobs:
333320
BUILD_DATE=${{ env.BUILD_DATE }}
334321
CYCLONEDX_NPM_VERSION=${{ env.CYCLONEDX_NPM_VERSION }}
335322
heroku:
336-
if: github.repository == 'juice-shop/juice-shop' && github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
323+
if: github.repository == 'juice-shop/juice-shop' && github.event_name == 'push' && (github.ref == 'refs/heads/angular17' || github.ref == 'refs/heads/master') # TODO Switch angular17 back to develop after merge
337324
needs: [test, api-test, e2e, custom-config-test]
338325
runs-on: ubuntu-latest
339326
steps:
340327
- name: "Check out Git repository"
341328
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
342329
- name: "Install Heroku CLI"
343330
run: curl https://cli-assets.heroku.com/install.sh | sh
344-
- name: "Set Heroku app & branch for ${{ github.ref }}"
331+
- name: "Set Heroku app & branch for ${{ github.ref }}" # TODO Switch angular17 back to develop after merge
345332
run: |
346333
if [ "$GITHUB_REF" == "refs/heads/master" ]; then
347334
echo "HEROKU_APP=juice-shop" >> $GITHUB_ENV

.github/workflows/lint-fixer.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
1313
with:
1414
node-version: 20
15-
- name: "Install CLI tools"
16-
run: npm install -g @angular/cli
1715
- name: "Install application"
1816
run: |
1917
npm install --ignore-scripts

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
tags:
55
- v*
66
env:
7-
ANGULAR_CLI_VERSION: 17
87
CYCLONEDX_NPM_VERSION: '^1.12.0'
98
jobs:
109
package:
@@ -22,7 +21,6 @@ jobs:
2221
node-version: ${{ matrix.node-version }}
2322
- name: "Install CLI tools"
2423
run: |
25-
npm install -g @angular/cli@$ANGULAR_CLI_VERSION
2624
npm install -g @cyclonedx/cyclonedx-npm@$CYCLONEDX_NPM_VERSION
2725
npm install -g grunt-cli
2826
- name: "Set packaging options for Grunt"

app.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
],
2020
"website": "https://owasp-juice.shop",
2121
"repository": "https://github.com/juice-shop/juice-shop",
22-
"logo": "https://raw.githubusercontent.com/juice-shop/juice-shop/master/frontend/src/assets/public/images/JuiceShop_Logo.png"
22+
"logo": "https://raw.githubusercontent.com/juice-shop/juice-shop/master/frontend/src/assets/public/images/JuiceShop_Logo.png",
23+
"engines": {
24+
"node": "20.x"
25+
}
2326
}

config.schema.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,3 +732,8 @@ ctf:
732732
type: string
733733
code:
734734
type: string
735+
yamlBombChallenge:
736+
name:
737+
type: string
738+
code:
739+
type: string

config/fbctf.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,3 +339,6 @@ ctf:
339339
exposedCredentialsChallenge:
340340
name: Montenegro
341341
code: ME
342+
yamlBombChallenge:
343+
name: Eswatini
344+
code: SZ

cypress.config.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@ export default defineConfig({
1515
fixturesFolder: false,
1616
supportFile: 'test/cypress/support/e2e.ts',
1717
setupNodeEvents (on: any) {
18-
on('before:browser:launch', (browser: any = {}, launchOptions: any) => { // TODO Remove after upgrade to Cypress >=12.5.0 <or> Chrome 119 become available on GitHub Workflows, see https://github.com/cypress-io/cypress-documentation/issues/5479
19-
if (browser.name === 'chrome' && browser.isHeadless) {
20-
launchOptions.args = launchOptions.args.map((arg: any) => {
21-
if (arg === '--headless') {
22-
return '--headless=new'
23-
}
24-
25-
return arg
26-
})
27-
}
28-
return launchOptions
29-
})
30-
3118
on('task', {
3219
GenerateCoupon (discount: number) {
3320
return security.generateCoupon(discount)

data/datacreator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ async function createQuantity () {
248248
async function createMemories () {
249249
const memories = [
250250
MemoryModel.create({
251-
imagePath: 'assets/public/images/uploads/😼-#zatschi-#whoneedsfourlegs-1572600969477.jpg',
251+
imagePath: 'assets/public/images/uploads/ᓚᘏᗢ-#zatschi-#whoneedsfourlegs-1572600969477.jpg',
252252
caption: '😼 #zatschi #whoneedsfourlegs',
253253
UserId: datacache.users.bjoernOwasp.id
254254
}).catch((err: unknown) => {

data/static/challenges.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,21 @@
10571057
- Docker
10581058
- Heroku
10591059
- Gitpod
1060+
-
1061+
name: 'Memory Bomb'
1062+
category: 'Insecure Deserialization'
1063+
tags:
1064+
- Danger Zone
1065+
description: 'Drop some explosive data into a vulnerable file-handling endpoint.'
1066+
difficulty: 5
1067+
hint: 'This one is actually similar to the XXE DoS challenge in every way except the data format being (ab)used.'
1068+
hintUrl: 'https://pwning.owasp-juice.shop/companion-guide/latest/part2/insecure-deserialization.html#_drop_some_explosive_data_into_a_vulnerable_file_handling_endpoint'
1069+
mitigationUrl: 'https://cheatsheetseries.owasp.org/cheatsheets/Denial_of_Service_Cheat_Sheet.html'
1070+
key: yamlBombChallenge
1071+
disabledEnv:
1072+
- Docker
1073+
- Heroku
1074+
- Gitpod
10601075
-
10611076
name: 'Zero Stars'
10621077
category: 'Improper Input Validation'

0 commit comments

Comments
 (0)