From aef2b9271bfde2abc6e714095d5b0bbc6b176995 Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 18:47:51 +0400 Subject: [PATCH 1/6] chore: initialize PR with an empty commit skip-checks:true From 35f8aba018282f9db1bbddb80d11eb23472990fa Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 19:37:21 +0400 Subject: [PATCH 2/6] ci: temporarily disable workflows while addressing security issues skip-checks:true --- .github/workflows/ci.yml | 64 ++++++++------------- .github/workflows/codeql-analysis.yml | 37 ++++++------ .github/workflows/lint-fixer.yml | 47 +++++++-------- .github/workflows/rebase.yml | 7 ++- .github/workflows/release.yml | 9 ++- .github/workflows/update-challenges-www.yml | 52 ++++++++--------- .github/workflows/update-news-www.yml | 44 +++++++------- 7 files changed, 125 insertions(+), 135 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8ed5bfa..f09ccb66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,22 +1,25 @@ name: "CI/CD Pipeline" on: - push: - branches-ignore: - - l10n_develop - - gh-pages - paths-ignore: - - '*.md' - - 'LICENSE' - - 'monitoring/grafana-dashboard.json' - - 'screenshots/**' - tags-ignore: - - '*' - pull_request: - paths-ignore: - - '*.md' - - 'LICENSE' - - 'data/static/i18n/*.json' - - 'frontend/src/assets/i18n/*.json' + workflow_dispatch: +# on: +# push: +# branches-ignore: +# - l10n_develop +# - gh-pages +# paths-ignore: +# - '*.md' +# - 'LICENSE' +# - 'monitoring/grafana-dashboard.json' +# - 'screenshots/**' +# tags-ignore: +# - '*' +# pull_request: +# paths-ignore: +# - '*.md' +# - 'LICENSE' +# - 'data/static/i18n/*.json' +# - 'frontend/src/assets/i18n/*.json' + env: NODE_DEFAULT_VERSION: 22 NODE_OPTIONS: "--max_old_space_size=4096" @@ -40,18 +43,8 @@ jobs: run: npm run lint - name: "Lint customization configs" run: > - npm run lint:config -- -f ./config/7ms.yml && - npm run lint:config -- -f ./config/addo.yml && - npm run lint:config -- -f ./config/bodgeit.yml && - npm run lint:config -- -f ./config/ctf.yml && - npm run lint:config -- -f ./config/default.yml && - npm run lint:config -- -f ./config/fbctf.yml && - npm run lint:config -- -f ./config/juicebox.yml && - npm run lint:config -- -f ./config/mozilla.yml && - npm run lint:config -- -f ./config/oss.yml && - npm run lint:config -- -f ./config/quiet.yml && - npm run lint:config -- -f ./config/tutorial.yml && - npm run lint:config -- -f ./config/unsafe.yml + npm run lint:config -- -f ./config/7ms.yml && npm run lint:config -- -f ./config/addo.yml && npm run lint:config -- -f ./config/bodgeit.yml && npm run lint:config -- -f ./config/ctf.yml && npm run lint:config -- -f ./config/default.yml && npm run lint:config -- -f ./config/fbctf.yml && npm run lint:config -- -f ./config/juicebox.yml && npm run lint:config -- -f ./config/mozilla.yml && npm run lint:config -- -f ./config/oss.yml && npm run lint:config -- -f ./config/quiet.yml && npm run lint:config -- -f ./config/tutorial.yml && npm run lint:config -- -f ./config/unsafe.yml + coding-challenge-rsn: runs-on: windows-latest steps: @@ -184,17 +177,8 @@ jobs: timeout_minutes: 30 max_attempts: 3 command: > - NODE_ENV=7ms npm run test:server && - NODE_ENV=addo npm run test:server && - NODE_ENV=bodgeit npm run test:server && - NODE_ENV=ctf npm run test:server && - NODE_ENV=fbctf npm run test:server && - NODE_ENV=juicebox npm run test:server && - NODE_ENV=mozilla npm run test:server && - NODE_ENV=oss npm run test:server && - NODE_ENV=quiet npm run test:server && - NODE_ENV=tutorial npm run test:server && - NODE_ENV=unsafe npm run test:server + NODE_ENV=7ms npm run test:server && NODE_ENV=addo npm run test:server && NODE_ENV=bodgeit npm run test:server && NODE_ENV=ctf npm run test:server && NODE_ENV=fbctf npm run test:server && NODE_ENV=juicebox npm run test:server && NODE_ENV=mozilla npm run test:server && NODE_ENV=oss npm run test:server && NODE_ENV=quiet npm run test:server && NODE_ENV=tutorial npm run test:server && NODE_ENV=unsafe npm run test:server + e2e: runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fe353eb0..df6c22ca 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,8 +1,9 @@ name: "CodeQL Scan" - on: - push: - pull_request: + workflow_dispatch: +# on: +# push: +# pull_request: jobs: analyze: @@ -15,19 +16,19 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript-typescript' ] + language: ['javascript-typescript'] steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: security-extended - config: | - paths-ignore: - - 'data/static/codefixes' - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + queries: security-extended + config: | + paths-ignore: + - 'data/static/codefixes' + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/lint-fixer.yml b/.github/workflows/lint-fixer.yml index 907f841e..73a62044 100644 --- a/.github/workflows/lint-fixer.yml +++ b/.github/workflows/lint-fixer.yml @@ -1,29 +1,30 @@ name: "Let me lint:fix that for you" - -on: [push] +on: + workflow_dispatch: +# on: [push] jobs: LMLFTFY: runs-on: ubuntu-latest steps: - - name: "Check out Git repository" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 - - name: "Use Node.js 22" - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0 - with: - node-version: 22 - - name: "Install application" - run: | - npm install --ignore-scripts - cd frontend - npm install --ignore-scripts --legacy-peer-deps - - name: "Fix everything which can be fixed" - run: 'npm run lint:fix' - - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 - with: - commit_message: "Auto-fix linting issues" - branch: ${{ github.head_ref }} - commit_options: '--signoff' - commit_user_name: JuiceShopBot - commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com - commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> + - name: "Check out Git repository" + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 + - name: "Use Node.js 22" + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0 + with: + node-version: 22 + - name: "Install application" + run: | + npm install --ignore-scripts + cd frontend + npm install --ignore-scripts --legacy-peer-deps + - name: "Fix everything which can be fixed" + run: 'npm run lint:fix' + - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 + with: + commit_message: "Auto-fix linting issues" + branch: ${{ github.head_ref }} + commit_options: '--signoff' + commit_user_name: JuiceShopBot + commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com + commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index f999d22e..d2dea74a 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -1,8 +1,9 @@ name: Automatic Rebase - on: - issue_comment: - types: [created] + workflow_dispatch: +# on: +# issue_comment: +# types: [created] jobs: rebase: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27674eec..f4e8ed4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,11 @@ name: "Release Pipeline" on: - push: - tags: - - v* + workflow_dispatch: +# on: +# push: +# tags: +# - v* + env: CYCLONEDX_NPM_VERSION: '^2.0.0||^3.0.0' jobs: diff --git a/.github/workflows/update-challenges-www.yml b/.github/workflows/update-challenges-www.yml index caaa7405..53223acf 100644 --- a/.github/workflows/update-challenges-www.yml +++ b/.github/workflows/update-challenges-www.yml @@ -1,34 +1,34 @@ name: "Update challenges on owasp-juice.shop" - on: - push: - branches: [ master ] - paths: - - 'data/static/challenges.yml' + workflow_dispatch: +# on: +# push: +# branches: [master] +# paths: +# - 'data/static/challenges.yml' jobs: UpdateChallengesOnWebsite: if: github.repository == 'juice-shop/juice-shop' runs-on: ubuntu-latest steps: - - name: Check out Git repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 - with: - token: ${{ secrets.BOT_TOKEN }} - repository: OWASP/www-project-juice-shop - ref: master - - name: Update challenges.yml - run: | - cd _data/ - rm challenges.yml - wget https://raw.githubusercontent.com/juice-shop/juice-shop/master/data/static/challenges.yml - - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 - with: - commit_message: "Auto-update challenges.yml from ${{ github.sha }}" - branch: master - commit_options: '--signoff' - - # Optional commit user and author settings - commit_user_name: JuiceShopBot - commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com - commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> + - name: Check out Git repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 + with: + token: ${{ secrets.BOT_TOKEN }} + repository: OWASP/www-project-juice-shop + ref: master + - name: Update challenges.yml + run: | + cd _data/ + rm challenges.yml + wget https://raw.githubusercontent.com/juice-shop/juice-shop/master/data/static/challenges.yml + - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 + with: + commit_message: "Auto-update challenges.yml from ${{ github.sha }}" + branch: master + commit_options: '--signoff' + # Optional commit user and author settings + commit_user_name: JuiceShopBot + commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com + commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> diff --git a/.github/workflows/update-news-www.yml b/.github/workflows/update-news-www.yml index 26757465..3c04b17d 100644 --- a/.github/workflows/update-news-www.yml +++ b/.github/workflows/update-news-www.yml @@ -1,29 +1,29 @@ name: "Update news on owasp-juice.shop" - on: - release: - types: [ published ] + workflow_dispatch: +# on: +# release: +# types: [published] jobs: UpdateNewsOnWebsite: runs-on: ubuntu-latest steps: - - name: Check out Git repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 - with: - token: ${{ secrets.BOT_TOKEN }} - repository: OWASP/www-project-juice-shop - branch: master - - name: Update tab_news.md - run: | - sed -i 's//\n* ${{ github.event.release.published_at }}: juice-shop [`${{ github.event.release.tag_name }}`](https:\/\/github.com\/juice-shop\/juice-shop\/releases\/tag\/${{ github.event.release.tag_name }})/' tab_news.md - - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 - with: - commit_message: "Add juice-shop ${{ github.event.release.tag_name }} release notes to tab_news.md" - branch: master - commit_options: '--signoff' - - # Optional commit user and author settings - commit_user_name: JuiceShopBot - commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com - commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> + - name: Check out Git repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 + with: + token: ${{ secrets.BOT_TOKEN }} + repository: OWASP/www-project-juice-shop + branch: master + - name: Update tab_news.md + run: | + sed -i 's//\n* ${{ github.event.release.published_at }}: juice-shop [`${{ github.event.release.tag_name }}`](https:\/\/github.com\/juice-shop\/juice-shop\/releases\/tag\/${{ github.event.release.tag_name }})/' tab_news.md + - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1 + with: + commit_message: "Add juice-shop ${{ github.event.release.tag_name }} release notes to tab_news.md" + branch: master + commit_options: '--signoff' + # Optional commit user and author settings + commit_user_name: JuiceShopBot + commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com + commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com> From 21d04dcb1dceab2e85d52a72e0adf93867d234fb Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 20:10:58 +0400 Subject: [PATCH 3/6] test: add auto-generated e2e security tests skip-checks:true --- .../tests/delete-api-addresss-1.test.ts | 36 +++++++++++++ .../tests/delete-api-basketitems-1.test.ts | 36 +++++++++++++ .brightsec/tests/delete-api-cards-1.test.ts | 35 +++++++++++++ .../tests/delete-api-challenges-1.test.ts | 35 +++++++++++++ .../tests/delete-api-complaints-1.test.ts | 39 ++++++++++++++ .../delete-api-privacy-requests-1.test.ts | 36 +++++++++++++ .../tests/delete-api-products-1.test.ts | 35 +++++++++++++ .../tests/delete-api-quantitys-123.test.ts | 36 +++++++++++++ .../tests/delete-api-recycles-1.test.ts | 35 +++++++++++++ .../delete-api-security-questions-1.test.ts | 35 +++++++++++++ .../delete-api-securityanswers-1.test.ts | 35 +++++++++++++ .brightsec/tests/delete-api-users-123.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-addresss-1.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-addresss.test.ts | 36 +++++++++++++ .../tests/get-api-basket-items-1.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-basket-items.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-cards-1.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-cards.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-challenges-1.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-challenges.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-complaints-1.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-complaints.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-deliverys-1.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-deliverys.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-docs.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-feedbacks-1.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-feedbacks.test.ts | 35 +++++++++++++ .../tests/get-api-privacy-requests.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-products-1.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-products.test.ts | 35 +++++++++++++ .../tests/get-api-quantitys-123.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-quantitys.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-recycles-1.test.ts | 35 +++++++++++++ .../tests/get-api-security-answers-1.test.ts | 35 +++++++++++++ .../tests/get-api-security-answers.test.ts | 35 +++++++++++++ .../tests/get-api-security-questions.test.ts | 35 +++++++++++++ .brightsec/tests/get-api-users-123.test.ts | 36 +++++++++++++ .brightsec/tests/get-api-users.test.ts | 36 +++++++++++++ .brightsec/tests/get-assets-i18n.test.ts | 35 +++++++++++++ .../get-assets-public-images-padding.test.ts | 35 +++++++++++++ .../get-assets-public-images-products.test.ts | 35 +++++++++++++ .../get-assets-public-images-uploads.test.ts | 35 +++++++++++++ .brightsec/tests/get-dataerasure.test.ts | 36 +++++++++++++ .../get-encryptionkeys-samplefile-key.test.ts | 35 +++++++++++++ .../get-encryptionkeys-samplekeyfile.test.ts | 35 +++++++++++++ .../tests/get-ftp-sample-file-md.test.ts | 35 +++++++++++++ .brightsec/tests/get-ftp-sample-md.test.ts | 36 +++++++++++++ .brightsec/tests/get-metrics.test.ts | 36 +++++++++++++ .brightsec/tests/get-profile.test.ts | 38 ++++++++++++++ .brightsec/tests/get-promotion.test.ts | 35 +++++++++++++ .brightsec/tests/get-redirect-to-url.test.ts | 35 +++++++++++++ .brightsec/tests/get-rest-2fa-status.test.ts | 35 +++++++++++++ ...st-admin-application-configuration.test.ts | 36 +++++++++++++ ...get-rest-admin-application-version.test.ts | 36 +++++++++++++ .../tests/get-rest-basket-1-order.test.ts | 35 +++++++++++++ .brightsec/tests/get-rest-basket-1.test.ts | 36 +++++++++++++ .brightsec/tests/get-rest-captcha.test.ts | 35 +++++++++++++ .../tests/get-rest-chatbot-status.test.ts | 36 +++++++++++++ .../get-rest-continue-code-findit.test.ts | 35 +++++++++++++ .../get-rest-continue-code-fixit.test.ts | 35 +++++++++++++ .../tests/get-rest-continue-code.test.ts | 35 +++++++++++++ .../tests/get-rest-country-mapping.test.ts | 35 +++++++++++++ .../tests/get-rest-deluxe-membership.test.ts | 35 +++++++++++++ .../tests/get-rest-image-captcha.test.ts | 36 +++++++++++++ .brightsec/tests/get-rest-languages.test.ts | 35 +++++++++++++ .brightsec/tests/get-rest-memories.test.ts | 35 +++++++++++++ .../get-rest-order-history-orders.test.ts | 36 +++++++++++++ .../tests/get-rest-order-history.test.ts | 39 ++++++++++++++ .../tests/get-rest-products-1-reviews.test.ts | 35 +++++++++++++ .../tests/get-rest-products-search.test.ts | 35 +++++++++++++ .../get-rest-repeat-notification.test.ts | 35 +++++++++++++ .../tests/get-rest-save-login-ip.test.ts | 36 +++++++++++++ .../get-rest-snippets-fixes-samplekey.test.ts | 35 +++++++++++++ .../tests/get-rest-track-order-12345.test.ts | 35 +++++++++++++ ...t-rest-user-authentication-details.test.ts | 35 +++++++++++++ .../get-rest-user-change-password.test.ts | 36 +++++++++++++ .../get-rest-user-security-question.test.ts | 35 +++++++++++++ .brightsec/tests/get-rest-user-whoami.test.ts | 36 +++++++++++++ .../tests/get-rest-wallet-balance.test.ts | 35 +++++++++++++ .../get-rest-web3-nft-mint-listen.test.ts | 35 +++++++++++++ .../tests/get-rest-web3-nft-unlocked.test.ts | 35 +++++++++++++ .brightsec/tests/get-security-txt.test.ts | 36 +++++++++++++ .../get-snippets-sample-challenge.test.ts | 35 +++++++++++++ .../get-solve-challenges-server-side.test.ts | 35 +++++++++++++ .../tests/get-support-logs-file.test.ts | 35 +++++++++++++ .../tests/get-support-logs-sample-log.test.ts | 35 +++++++++++++ ...-be-unlocked-by-sending-1btc-to-us.test.ts | 35 +++++++++++++ .brightsec/tests/get-video.test.ts | 36 +++++++++++++ ...easonably-necessary-responsibility.test.ts | 35 +++++++++++++ .../tests/get-well-known-samplefile.test.ts | 35 +++++++++++++ .../tests/get-well-known-security-txt.test.ts | 36 +++++++++++++ .brightsec/tests/get-well-known.test.ts | 36 +++++++++++++ .../tests/patch-rest-products-reviews.test.ts | 40 ++++++++++++++ .brightsec/tests/post-api-addresss.test.ts | 43 +++++++++++++++ .../tests/post-api-basket-items.test.ts | 41 +++++++++++++++ .brightsec/tests/post-api-cards.test.ts | 43 +++++++++++++++ .brightsec/tests/post-api-challenges.test.ts | 35 +++++++++++++ .../tests/post-api-complaints-1.test.ts | 41 +++++++++++++++ .brightsec/tests/post-api-feedbacks.test.ts | 41 +++++++++++++++ .../tests/post-api-privacy-requests-1.test.ts | 40 ++++++++++++++ .../tests/post-api-privacy-requests.test.ts | 40 ++++++++++++++ .brightsec/tests/post-api-products.test.ts | 46 ++++++++++++++++ .brightsec/tests/post-api-quantitys-1.test.ts | 41 +++++++++++++++ .brightsec/tests/post-api-quantitys.test.ts | 41 +++++++++++++++ .brightsec/tests/post-api-recycles.test.ts | 43 +++++++++++++++ .../tests/post-api-security-answers-1.test.ts | 41 +++++++++++++++ .../tests/post-api-security-answers.test.ts | 41 +++++++++++++++ .../post-api-security-questions-1.test.ts | 41 +++++++++++++++ .brightsec/tests/post-api-users.test.ts | 41 +++++++++++++++ .brightsec/tests/post-b2b-v2-orders.test.ts | 40 ++++++++++++++ .brightsec/tests/post-dataerasure.test.ts | 40 ++++++++++++++ .brightsec/tests/post-file-upload.test.ts | 40 ++++++++++++++ .../tests/post-profile-image-file.test.ts | 37 +++++++++++++ .../tests/post-profile-image-url.test.ts | 39 ++++++++++++++ .brightsec/tests/post-profile.test.ts | 39 ++++++++++++++ .../tests/post-rest-2fa-disable.test.ts | 39 ++++++++++++++ .brightsec/tests/post-rest-2fa-setup.test.ts | 41 +++++++++++++++ .brightsec/tests/post-rest-2fa-verify.test.ts | 40 ++++++++++++++ .../tests/post-rest-basket-1-checkout.test.ts | 44 ++++++++++++++++ .../tests/post-rest-chatbot-respond.test.ts | 43 +++++++++++++++ .../tests/post-rest-deluxe-membership.test.ts | 41 +++++++++++++++ .brightsec/tests/post-rest-memories.test.ts | 40 ++++++++++++++ .../tests/post-rest-products-reviews.test.ts | 40 ++++++++++++++ .../tests/post-rest-user-data-export.test.ts | 42 +++++++++++++++ .brightsec/tests/post-rest-user-login.test.ts | 40 ++++++++++++++ .../post-rest-user-reset-password.test.ts | 42 +++++++++++++++ .../tests/post-rest-web3-submit-key.test.ts | 39 ++++++++++++++ ...t-rest-web3-wallet-exploit-address.test.ts | 39 ++++++++++++++ .../post-rest-web3-wallet-nft-verify.test.ts | 39 ++++++++++++++ .brightsec/tests/post-snippets-fixes.test.ts | 40 ++++++++++++++ .../tests/post-snippets-verdict.test.ts | 40 ++++++++++++++ .brightsec/tests/put-api-addresses-1.test.ts | 45 ++++++++++++++++ .brightsec/tests/put-api-addresss-1.test.ts | 45 ++++++++++++++++ .../tests/put-api-basketitems-1.test.ts | 41 +++++++++++++++ .brightsec/tests/put-api-cards-1.test.ts | 43 +++++++++++++++ .brightsec/tests/put-api-challenges-1.test.ts | 52 +++++++++++++++++++ .brightsec/tests/put-api-complaints-1.test.ts | 40 ++++++++++++++ .brightsec/tests/put-api-feedbacks-1.test.ts | 35 +++++++++++++ .../tests/put-api-privacyrequests-1.test.ts | 40 ++++++++++++++ .brightsec/tests/put-api-quantitys-1.test.ts | 41 +++++++++++++++ .brightsec/tests/put-api-recycles-1.test.ts | 43 +++++++++++++++ .../tests/put-api-security-answers-1.test.ts | 39 ++++++++++++++ .../put-api-security-questions-1.test.ts | 35 +++++++++++++ .brightsec/tests/put-api-users-1.test.ts | 42 +++++++++++++++ ...-rest-basket-1-coupon-valid-coupon.test.ts | 36 +++++++++++++ ...ntinue-code-apply-example-code-123.test.ts | 39 ++++++++++++++ ...-continue-code-findit-apply-abc123.test.ts | 39 ++++++++++++++ ...t-continue-code-fixit-apply-abc123.test.ts | 35 +++++++++++++ ...t-order-history-id-delivery-status.test.ts | 42 +++++++++++++++ .../put-rest-products-id-reviews.test.ts | 40 ++++++++++++++ .../tests/put-rest-wallet-balance.test.ts | 41 +++++++++++++++ 151 files changed, 5657 insertions(+) create mode 100644 .brightsec/tests/delete-api-addresss-1.test.ts create mode 100644 .brightsec/tests/delete-api-basketitems-1.test.ts create mode 100644 .brightsec/tests/delete-api-cards-1.test.ts create mode 100644 .brightsec/tests/delete-api-challenges-1.test.ts create mode 100644 .brightsec/tests/delete-api-complaints-1.test.ts create mode 100644 .brightsec/tests/delete-api-privacy-requests-1.test.ts create mode 100644 .brightsec/tests/delete-api-products-1.test.ts create mode 100644 .brightsec/tests/delete-api-quantitys-123.test.ts create mode 100644 .brightsec/tests/delete-api-recycles-1.test.ts create mode 100644 .brightsec/tests/delete-api-security-questions-1.test.ts create mode 100644 .brightsec/tests/delete-api-securityanswers-1.test.ts create mode 100644 .brightsec/tests/delete-api-users-123.test.ts create mode 100644 .brightsec/tests/get-api-addresss-1.test.ts create mode 100644 .brightsec/tests/get-api-addresss.test.ts create mode 100644 .brightsec/tests/get-api-basket-items-1.test.ts create mode 100644 .brightsec/tests/get-api-basket-items.test.ts create mode 100644 .brightsec/tests/get-api-cards-1.test.ts create mode 100644 .brightsec/tests/get-api-cards.test.ts create mode 100644 .brightsec/tests/get-api-challenges-1.test.ts create mode 100644 .brightsec/tests/get-api-challenges.test.ts create mode 100644 .brightsec/tests/get-api-complaints-1.test.ts create mode 100644 .brightsec/tests/get-api-complaints.test.ts create mode 100644 .brightsec/tests/get-api-deliverys-1.test.ts create mode 100644 .brightsec/tests/get-api-deliverys.test.ts create mode 100644 .brightsec/tests/get-api-docs.test.ts create mode 100644 .brightsec/tests/get-api-feedbacks-1.test.ts create mode 100644 .brightsec/tests/get-api-feedbacks.test.ts create mode 100644 .brightsec/tests/get-api-privacy-requests.test.ts create mode 100644 .brightsec/tests/get-api-products-1.test.ts create mode 100644 .brightsec/tests/get-api-products.test.ts create mode 100644 .brightsec/tests/get-api-quantitys-123.test.ts create mode 100644 .brightsec/tests/get-api-quantitys.test.ts create mode 100644 .brightsec/tests/get-api-recycles-1.test.ts create mode 100644 .brightsec/tests/get-api-security-answers-1.test.ts create mode 100644 .brightsec/tests/get-api-security-answers.test.ts create mode 100644 .brightsec/tests/get-api-security-questions.test.ts create mode 100644 .brightsec/tests/get-api-users-123.test.ts create mode 100644 .brightsec/tests/get-api-users.test.ts create mode 100644 .brightsec/tests/get-assets-i18n.test.ts create mode 100644 .brightsec/tests/get-assets-public-images-padding.test.ts create mode 100644 .brightsec/tests/get-assets-public-images-products.test.ts create mode 100644 .brightsec/tests/get-assets-public-images-uploads.test.ts create mode 100644 .brightsec/tests/get-dataerasure.test.ts create mode 100644 .brightsec/tests/get-encryptionkeys-samplefile-key.test.ts create mode 100644 .brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts create mode 100644 .brightsec/tests/get-ftp-sample-file-md.test.ts create mode 100644 .brightsec/tests/get-ftp-sample-md.test.ts create mode 100644 .brightsec/tests/get-metrics.test.ts create mode 100644 .brightsec/tests/get-profile.test.ts create mode 100644 .brightsec/tests/get-promotion.test.ts create mode 100644 .brightsec/tests/get-redirect-to-url.test.ts create mode 100644 .brightsec/tests/get-rest-2fa-status.test.ts create mode 100644 .brightsec/tests/get-rest-admin-application-configuration.test.ts create mode 100644 .brightsec/tests/get-rest-admin-application-version.test.ts create mode 100644 .brightsec/tests/get-rest-basket-1-order.test.ts create mode 100644 .brightsec/tests/get-rest-basket-1.test.ts create mode 100644 .brightsec/tests/get-rest-captcha.test.ts create mode 100644 .brightsec/tests/get-rest-chatbot-status.test.ts create mode 100644 .brightsec/tests/get-rest-continue-code-findit.test.ts create mode 100644 .brightsec/tests/get-rest-continue-code-fixit.test.ts create mode 100644 .brightsec/tests/get-rest-continue-code.test.ts create mode 100644 .brightsec/tests/get-rest-country-mapping.test.ts create mode 100644 .brightsec/tests/get-rest-deluxe-membership.test.ts create mode 100644 .brightsec/tests/get-rest-image-captcha.test.ts create mode 100644 .brightsec/tests/get-rest-languages.test.ts create mode 100644 .brightsec/tests/get-rest-memories.test.ts create mode 100644 .brightsec/tests/get-rest-order-history-orders.test.ts create mode 100644 .brightsec/tests/get-rest-order-history.test.ts create mode 100644 .brightsec/tests/get-rest-products-1-reviews.test.ts create mode 100644 .brightsec/tests/get-rest-products-search.test.ts create mode 100644 .brightsec/tests/get-rest-repeat-notification.test.ts create mode 100644 .brightsec/tests/get-rest-save-login-ip.test.ts create mode 100644 .brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts create mode 100644 .brightsec/tests/get-rest-track-order-12345.test.ts create mode 100644 .brightsec/tests/get-rest-user-authentication-details.test.ts create mode 100644 .brightsec/tests/get-rest-user-change-password.test.ts create mode 100644 .brightsec/tests/get-rest-user-security-question.test.ts create mode 100644 .brightsec/tests/get-rest-user-whoami.test.ts create mode 100644 .brightsec/tests/get-rest-wallet-balance.test.ts create mode 100644 .brightsec/tests/get-rest-web3-nft-mint-listen.test.ts create mode 100644 .brightsec/tests/get-rest-web3-nft-unlocked.test.ts create mode 100644 .brightsec/tests/get-security-txt.test.ts create mode 100644 .brightsec/tests/get-snippets-sample-challenge.test.ts create mode 100644 .brightsec/tests/get-solve-challenges-server-side.test.ts create mode 100644 .brightsec/tests/get-support-logs-file.test.ts create mode 100644 .brightsec/tests/get-support-logs-sample-log.test.ts create mode 100644 .brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts create mode 100644 .brightsec/tests/get-video.test.ts create mode 100644 .brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts create mode 100644 .brightsec/tests/get-well-known-samplefile.test.ts create mode 100644 .brightsec/tests/get-well-known-security-txt.test.ts create mode 100644 .brightsec/tests/get-well-known.test.ts create mode 100644 .brightsec/tests/patch-rest-products-reviews.test.ts create mode 100644 .brightsec/tests/post-api-addresss.test.ts create mode 100644 .brightsec/tests/post-api-basket-items.test.ts create mode 100644 .brightsec/tests/post-api-cards.test.ts create mode 100644 .brightsec/tests/post-api-challenges.test.ts create mode 100644 .brightsec/tests/post-api-complaints-1.test.ts create mode 100644 .brightsec/tests/post-api-feedbacks.test.ts create mode 100644 .brightsec/tests/post-api-privacy-requests-1.test.ts create mode 100644 .brightsec/tests/post-api-privacy-requests.test.ts create mode 100644 .brightsec/tests/post-api-products.test.ts create mode 100644 .brightsec/tests/post-api-quantitys-1.test.ts create mode 100644 .brightsec/tests/post-api-quantitys.test.ts create mode 100644 .brightsec/tests/post-api-recycles.test.ts create mode 100644 .brightsec/tests/post-api-security-answers-1.test.ts create mode 100644 .brightsec/tests/post-api-security-answers.test.ts create mode 100644 .brightsec/tests/post-api-security-questions-1.test.ts create mode 100644 .brightsec/tests/post-api-users.test.ts create mode 100644 .brightsec/tests/post-b2b-v2-orders.test.ts create mode 100644 .brightsec/tests/post-dataerasure.test.ts create mode 100644 .brightsec/tests/post-file-upload.test.ts create mode 100644 .brightsec/tests/post-profile-image-file.test.ts create mode 100644 .brightsec/tests/post-profile-image-url.test.ts create mode 100644 .brightsec/tests/post-profile.test.ts create mode 100644 .brightsec/tests/post-rest-2fa-disable.test.ts create mode 100644 .brightsec/tests/post-rest-2fa-setup.test.ts create mode 100644 .brightsec/tests/post-rest-2fa-verify.test.ts create mode 100644 .brightsec/tests/post-rest-basket-1-checkout.test.ts create mode 100644 .brightsec/tests/post-rest-chatbot-respond.test.ts create mode 100644 .brightsec/tests/post-rest-deluxe-membership.test.ts create mode 100644 .brightsec/tests/post-rest-memories.test.ts create mode 100644 .brightsec/tests/post-rest-products-reviews.test.ts create mode 100644 .brightsec/tests/post-rest-user-data-export.test.ts create mode 100644 .brightsec/tests/post-rest-user-login.test.ts create mode 100644 .brightsec/tests/post-rest-user-reset-password.test.ts create mode 100644 .brightsec/tests/post-rest-web3-submit-key.test.ts create mode 100644 .brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts create mode 100644 .brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts create mode 100644 .brightsec/tests/post-snippets-fixes.test.ts create mode 100644 .brightsec/tests/post-snippets-verdict.test.ts create mode 100644 .brightsec/tests/put-api-addresses-1.test.ts create mode 100644 .brightsec/tests/put-api-addresss-1.test.ts create mode 100644 .brightsec/tests/put-api-basketitems-1.test.ts create mode 100644 .brightsec/tests/put-api-cards-1.test.ts create mode 100644 .brightsec/tests/put-api-challenges-1.test.ts create mode 100644 .brightsec/tests/put-api-complaints-1.test.ts create mode 100644 .brightsec/tests/put-api-feedbacks-1.test.ts create mode 100644 .brightsec/tests/put-api-privacyrequests-1.test.ts create mode 100644 .brightsec/tests/put-api-quantitys-1.test.ts create mode 100644 .brightsec/tests/put-api-recycles-1.test.ts create mode 100644 .brightsec/tests/put-api-security-answers-1.test.ts create mode 100644 .brightsec/tests/put-api-security-questions-1.test.ts create mode 100644 .brightsec/tests/put-api-users-1.test.ts create mode 100644 .brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts create mode 100644 .brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts create mode 100644 .brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts create mode 100644 .brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts create mode 100644 .brightsec/tests/put-rest-order-history-id-delivery-status.test.ts create mode 100644 .brightsec/tests/put-rest-products-id-reviews.test.ts create mode 100644 .brightsec/tests/put-rest-wallet-balance.test.ts diff --git a/.brightsec/tests/delete-api-addresss-1.test.ts b/.brightsec/tests/delete-api-addresss-1.test.ts new file mode 100644 index 00000000..b7830e0a --- /dev/null +++ b/.brightsec/tests/delete-api-addresss-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Addresss/1`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/delete-api-basketitems-1.test.ts b/.brightsec/tests/delete-api-basketitems-1.test.ts new file mode 100644 index 00000000..1c99d16e --- /dev/null +++ b/.brightsec/tests/delete-api-basketitems-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/BasketItems/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/BasketItems/1`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-cards-1.test.ts b/.brightsec/tests/delete-api-cards-1.test.ts new file mode 100644 index 00000000..8a1a4781 --- /dev/null +++ b/.brightsec/tests/delete-api-cards-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/cards/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-challenges-1.test.ts b/.brightsec/tests/delete-api-challenges-1.test.ts new file mode 100644 index 00000000..135fb06f --- /dev/null +++ b/.brightsec/tests/delete-api-challenges-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/Challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Challenges/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-complaints-1.test.ts b/.brightsec/tests/delete-api-complaints-1.test.ts new file mode 100644 index 00000000..f4eb425f --- /dev/null +++ b/.brightsec/tests/delete-api-complaints-1.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'jwt', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Complaints/1`, + headers: { + 'Authorization': 'Bearer ', + 'Content-Type': 'application/json' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-privacy-requests-1.test.ts b/.brightsec/tests/delete-api-privacy-requests-1.test.ts new file mode 100644 index 00000000..e62d3666 --- /dev/null +++ b/.brightsec/tests/delete-api-privacy-requests-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/privacy-requests/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/PrivacyRequests/1`, + headers: { 'X-Recruiting': 'Your Company Name' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-products-1.test.ts b/.brightsec/tests/delete-api-products-1.test.ts new file mode 100644 index 00000000..5be40331 --- /dev/null +++ b/.brightsec/tests/delete-api-products-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/products/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'http_method_fuzzing'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Products/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-quantitys-123.test.ts b/.brightsec/tests/delete-api-quantitys-123.test.ts new file mode 100644 index 00000000..183af4ad --- /dev/null +++ b/.brightsec/tests/delete-api-quantitys-123.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/Quantitys/123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'http_method_fuzzing', 'osi'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Quantitys/123`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-recycles-1.test.ts b/.brightsec/tests/delete-api-recycles-1.test.ts new file mode 100644 index 00000000..53fd9a6c --- /dev/null +++ b/.brightsec/tests/delete-api-recycles-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'id_enumeration', 'csrf', 'bopla'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Recycles/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-security-questions-1.test.ts b/.brightsec/tests/delete-api-security-questions-1.test.ts new file mode 100644 index 00000000..de2a3579 --- /dev/null +++ b/.brightsec/tests/delete-api-security-questions-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/SecurityQuestions/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/delete-api-securityanswers-1.test.ts b/.brightsec/tests/delete-api-securityanswers-1.test.ts new file mode 100644 index 00000000..d28b43f0 --- /dev/null +++ b/.brightsec/tests/delete-api-securityanswers-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/SecurityAnswers/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/SecurityAnswers/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/delete-api-users-123.test.ts b/.brightsec/tests/delete-api-users-123.test.ts new file mode 100644 index 00000000..eb84ecec --- /dev/null +++ b/.brightsec/tests/delete-api-users-123.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('DELETE /api/users/123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.DELETE, + url: `${baseUrl}/api/Users/123`, + headers: { 'X-Recruiting': 'We are hiring!' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-addresss-1.test.ts b/.brightsec/tests/get-api-addresss-1.test.ts new file mode 100644 index 00000000..8087a2e4 --- /dev/null +++ b/.brightsec/tests/get-api-addresss-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'sqli', 'csrf'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Addresss/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-addresss.test.ts b/.brightsec/tests/get-api-addresss.test.ts new file mode 100644 index 00000000..a485b3eb --- /dev/null +++ b/.brightsec/tests/get-api-addresss.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/addresss', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Addresss`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-basket-items-1.test.ts b/.brightsec/tests/get-api-basket-items-1.test.ts new file mode 100644 index 00000000..cafd07b6 --- /dev/null +++ b/.brightsec/tests/get-api-basket-items-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/basket-items/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'sqli', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/BasketItems/1`, + headers: { 'X-Recruiting': 'We are hiring! Visit https://owasp.org/www-project-juice-shop/' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-basket-items.test.ts b/.brightsec/tests/get-api-basket-items.test.ts new file mode 100644 index 00000000..8c75be4a --- /dev/null +++ b/.brightsec/tests/get-api-basket-items.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/basket-items', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/BasketItems`, + headers: { 'X-Recruiting': 'We are hiring!' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-cards-1.test.ts b/.brightsec/tests/get-api-cards-1.test.ts new file mode 100644 index 00000000..a8caa675 --- /dev/null +++ b/.brightsec/tests/get-api-cards-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'sqli', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Cards/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-cards.test.ts b/.brightsec/tests/get-api-cards.test.ts new file mode 100644 index 00000000..850cb3d8 --- /dev/null +++ b/.brightsec/tests/get-api-cards.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/cards', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/cards`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-challenges-1.test.ts b/.brightsec/tests/get-api-challenges-1.test.ts new file mode 100644 index 00000000..16f6d034 --- /dev/null +++ b/.brightsec/tests/get-api-challenges-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Challenges/1`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-challenges.test.ts b/.brightsec/tests/get-api-challenges.test.ts new file mode 100644 index 00000000..71398399 --- /dev/null +++ b/.brightsec/tests/get-api-challenges.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/challenges', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'xss', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Challenges`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-complaints-1.test.ts b/.brightsec/tests/get-api-complaints-1.test.ts new file mode 100644 index 00000000..dfad93f8 --- /dev/null +++ b/.brightsec/tests/get-api-complaints-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['id_enumeration', 'bopla', 'csrf', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Complaints/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-complaints.test.ts b/.brightsec/tests/get-api-complaints.test.ts new file mode 100644 index 00000000..4a5ae33a --- /dev/null +++ b/.brightsec/tests/get-api-complaints.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/complaints', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Complaints`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-deliverys-1.test.ts b/.brightsec/tests/get-api-deliverys-1.test.ts new file mode 100644 index 00000000..6e919157 --- /dev/null +++ b/.brightsec/tests/get-api-deliverys-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/deliverys/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['id_enumeration', 'bopla', 'improper_asset_management', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Deliverys/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-deliverys.test.ts b/.brightsec/tests/get-api-deliverys.test.ts new file mode 100644 index 00000000..2321b945 --- /dev/null +++ b/.brightsec/tests/get-api-deliverys.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/deliverys', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'improper_asset_management', 'xss', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Deliverys`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-docs.test.ts b/.brightsec/tests/get-api-docs.test.ts new file mode 100644 index 00000000..e8a7bdc5 --- /dev/null +++ b/.brightsec/tests/get-api-docs.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api-docs', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'csrf', 'improper_asset_management', 'full_path_disclosure', 'open_database'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api-docs`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-feedbacks-1.test.ts b/.brightsec/tests/get-api-feedbacks-1.test.ts new file mode 100644 index 00000000..d0ae8977 --- /dev/null +++ b/.brightsec/tests/get-api-feedbacks-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/feedbacks/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'xss', 'sqli', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Feedbacks/1`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-feedbacks.test.ts b/.brightsec/tests/get-api-feedbacks.test.ts new file mode 100644 index 00000000..a10231ab --- /dev/null +++ b/.brightsec/tests/get-api-feedbacks.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/feedbacks', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'xss', 'sqli'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Feedbacks`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-privacy-requests.test.ts b/.brightsec/tests/get-api-privacy-requests.test.ts new file mode 100644 index 00000000..ffbe5739 --- /dev/null +++ b/.brightsec/tests/get-api-privacy-requests.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/privacy-requests', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'improper_asset_management', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/PrivacyRequests`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-products-1.test.ts b/.brightsec/tests/get-api-products-1.test.ts new file mode 100644 index 00000000..600b75e1 --- /dev/null +++ b/.brightsec/tests/get-api-products-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/products/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'id_enumeration', 'xss', 'csrf', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Products/1`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-products.test.ts b/.brightsec/tests/get-api-products.test.ts new file mode 100644 index 00000000..02fe0462 --- /dev/null +++ b/.brightsec/tests/get-api-products.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/products', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Products`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-quantitys-123.test.ts b/.brightsec/tests/get-api-quantitys-123.test.ts new file mode 100644 index 00000000..577a0517 --- /dev/null +++ b/.brightsec/tests/get-api-quantitys-123.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/Quantitys/123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['id_enumeration', 'bopla', 'csrf', 'sqli', 'xss', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Quantitys/123`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-quantitys.test.ts b/.brightsec/tests/get-api-quantitys.test.ts new file mode 100644 index 00000000..a28c43d3 --- /dev/null +++ b/.brightsec/tests/get-api-quantitys.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/Quantitys', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Quantitys`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-recycles-1.test.ts b/.brightsec/tests/get-api-recycles-1.test.ts new file mode 100644 index 00000000..20c77b10 --- /dev/null +++ b/.brightsec/tests/get-api-recycles-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'id_enumeration', 'csrf', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Recycles/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-security-answers-1.test.ts b/.brightsec/tests/get-api-security-answers-1.test.ts new file mode 100644 index 00000000..89408f0e --- /dev/null +++ b/.brightsec/tests/get-api-security-answers-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/SecurityAnswers/1?email=user@example.com`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-security-answers.test.ts b/.brightsec/tests/get-api-security-answers.test.ts new file mode 100644 index 00000000..e24b3693 --- /dev/null +++ b/.brightsec/tests/get-api-security-answers.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/security-answers', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/SecurityAnswers?email=user@example.com`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-api-security-questions.test.ts b/.brightsec/tests/get-api-security-questions.test.ts new file mode 100644 index 00000000..0ec3cae8 --- /dev/null +++ b/.brightsec/tests/get-api-security-questions.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/security-questions', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'xss', 'sqli', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/SecurityQuestions?email=user@example.com`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-users-123.test.ts b/.brightsec/tests/get-api-users-123.test.ts new file mode 100644 index 00000000..3081ea3a --- /dev/null +++ b/.brightsec/tests/get-api-users-123.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/users/123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['id_enumeration', 'bopla', 'xss', 'csrf', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Users/123?callback=callbackFunction`, + headers: { 'X-Recruiting': 'We are hiring! Check out our careers page.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-users.test.ts b/.brightsec/tests/get-api-users.test.ts new file mode 100644 index 00000000..f102a3bb --- /dev/null +++ b/.brightsec/tests/get-api-users.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /api/users', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/api/Users`, + headers: { 'X-Recruiting': 'undefined' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-assets-i18n.test.ts b/.brightsec/tests/get-assets-i18n.test.ts new file mode 100644 index 00000000..37bebb76 --- /dev/null +++ b/.brightsec/tests/get-assets-i18n.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /assets/i18n', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'improper_asset_management', 'lfi'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/assets/i18n`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-assets-public-images-padding.test.ts b/.brightsec/tests/get-assets-public-images-padding.test.ts new file mode 100644 index 00000000..e69c9578 --- /dev/null +++ b/.brightsec/tests/get-assets-public-images-padding.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /assets/public/images/padding', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'lfi', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/assets/public/images/padding`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-assets-public-images-products.test.ts b/.brightsec/tests/get-assets-public-images-products.test.ts new file mode 100644 index 00000000..e73f39af --- /dev/null +++ b/.brightsec/tests/get-assets-public-images-products.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /assets/public/images/products', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'lfi', 'improper_asset_management', 'open_cloud_storage'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/assets/public/images/products`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-assets-public-images-uploads.test.ts b/.brightsec/tests/get-assets-public-images-uploads.test.ts new file mode 100644 index 00000000..ee2e8226 --- /dev/null +++ b/.brightsec/tests/get-assets-public-images-uploads.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /assets/public/images/uploads', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['file_upload', 'lfi', 'xss', 'csrf', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/assets/public/images/uploads`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-dataerasure.test.ts b/.brightsec/tests/get-dataerasure.test.ts new file mode 100644 index 00000000..8187820a --- /dev/null +++ b/.brightsec/tests/get-dataerasure.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /dataerasure', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'lfi', 'xss', 'bopla', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/dataerasure`, + headers: { 'X-Recruiting': 'undefined' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts b/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts new file mode 100644 index 00000000..a5e0e3d4 --- /dev/null +++ b/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /encryptionkeys/samplefile.key', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'full_path_disclosure', 'id_enumeration', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/encryptionkeys/samplefile.key`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts b/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts new file mode 100644 index 00000000..7eecb113 --- /dev/null +++ b/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /encryptionkeys/sampleKeyFile', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'open_cloud_storage', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/encryptionkeys/sampleKeyFile`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-ftp-sample-file-md.test.ts b/.brightsec/tests/get-ftp-sample-file-md.test.ts new file mode 100644 index 00000000..be65570d --- /dev/null +++ b/.brightsec/tests/get-ftp-sample-file-md.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /ftp/sample-file.md', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'ssrf', 'full_path_disclosure', 'unvalidated_redirect', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/ftp/sample-file.md`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-ftp-sample-md.test.ts b/.brightsec/tests/get-ftp-sample-md.test.ts new file mode 100644 index 00000000..2a4ba50f --- /dev/null +++ b/.brightsec/tests/get-ftp-sample-md.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /ftp/sample.md', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'directoryListingChallenge', 'accessLogDisclosureChallenge', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/ftp/sample.md`, + headers: { 'X-Recruiting': 'undefined' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-metrics.test.ts b/.brightsec/tests/get-metrics.test.ts new file mode 100644 index 00000000..ee866adf --- /dev/null +++ b/.brightsec/tests/get-metrics.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /metrics', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['improper_asset_management', 'csrf', 'xss', 'open_database', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/metrics`, + headers: { 'Content-Type': 'text/plain; version=0.0.4; charset=utf-8' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-profile.test.ts b/.brightsec/tests/get-profile.test.ts new file mode 100644 index 00000000..cadc4fc3 --- /dev/null +++ b/.brightsec/tests/get-profile.test.ts @@ -0,0 +1,38 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /profile', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'bopla', 'id_enumeration', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/profile`, + headers: { + 'Content-Security-Policy': "img-src 'self' ; script-src 'self' 'unsafe-eval' https://code.getmdl.io http://ajax.googleapis.com" + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-promotion.test.ts b/.brightsec/tests/get-promotion.test.ts new file mode 100644 index 00000000..4e859127 --- /dev/null +++ b/.brightsec/tests/get-promotion.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /promotion', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'csrf', 'full_path_disclosure', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/promotion`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-redirect-to-url.test.ts b/.brightsec/tests/get-redirect-to-url.test.ts new file mode 100644 index 00000000..5aba3f94 --- /dev/null +++ b/.brightsec/tests/get-redirect-to-url.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /redirect?to=:url', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['unvalidated_redirect', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/redirect?to=https://example.com`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-2fa-status.test.ts b/.brightsec/tests/get-rest-2fa-status.test.ts new file mode 100644 index 00000000..b3dd6520 --- /dev/null +++ b/.brightsec/tests/get-rest-2fa-status.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/2fa/status', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'secret_tokens', 'xss'], + attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/2fa/status`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-admin-application-configuration.test.ts b/.brightsec/tests/get-rest-admin-application-configuration.test.ts new file mode 100644 index 00000000..20017713 --- /dev/null +++ b/.brightsec/tests/get-rest-admin-application-configuration.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/admin/application-configuration', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['improper_asset_management', 'secret_tokens', 'open_database', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/admin/application-configuration`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-admin-application-version.test.ts b/.brightsec/tests/get-rest-admin-application-version.test.ts new file mode 100644 index 00000000..414691cc --- /dev/null +++ b/.brightsec/tests/get-rest-admin-application-version.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/admin/application-version', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'improper_asset_management', 'full_path_disclosure', 'xss', 'open_database'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/admin/application-version`, + headers: { 'X-Recruiting': 'true' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-basket-1-order.test.ts b/.brightsec/tests/get-rest-basket-1-order.test.ts new file mode 100644 index 00000000..ee9a4323 --- /dev/null +++ b/.brightsec/tests/get-rest-basket-1-order.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/basket/1/order', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/basket/1/order`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-basket-1.test.ts b/.brightsec/tests/get-rest-basket-1.test.ts new file mode 100644 index 00000000..f4244bb8 --- /dev/null +++ b/.brightsec/tests/get-rest-basket-1.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/basket/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/basket/1`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-captcha.test.ts b/.brightsec/tests/get-rest-captcha.test.ts new file mode 100644 index 00000000..2914a3e7 --- /dev/null +++ b/.brightsec/tests/get-rest-captcha.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/captcha', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['osi', 'csrf', 'business_constraint_bypass', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/captcha`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-chatbot-status.test.ts b/.brightsec/tests/get-rest-chatbot-status.test.ts new file mode 100644 index 00000000..403298cf --- /dev/null +++ b/.brightsec/tests/get-rest-chatbot-status.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/chatbot/status', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'jwt', 'xss', 'osi', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/chatbot/status`, + headers: { 'Authorization': 'Bearer ' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-continue-code-findit.test.ts b/.brightsec/tests/get-rest-continue-code-findit.test.ts new file mode 100644 index 00000000..b0ba5e47 --- /dev/null +++ b/.brightsec/tests/get-rest-continue-code-findit.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/continue-code-findIt', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['business_constraint_bypass', 'id_enumeration', 'open_database', 'sqli', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/continue-code-findIt`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-continue-code-fixit.test.ts b/.brightsec/tests/get-rest-continue-code-fixit.test.ts new file mode 100644 index 00000000..805399d5 --- /dev/null +++ b/.brightsec/tests/get-rest-continue-code-fixit.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/continue-code-fixIt', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'csrf', 'xss', 'insecure_tls_configuration', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/continue-code-fixIt`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-continue-code.test.ts b/.brightsec/tests/get-rest-continue-code.test.ts new file mode 100644 index 00000000..73cd33c7 --- /dev/null +++ b/.brightsec/tests/get-rest-continue-code.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/continue-code', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'id_enumeration', 'sqli', 'ssrf'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/continue-code`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-country-mapping.test.ts b/.brightsec/tests/get-rest-country-mapping.test.ts new file mode 100644 index 00000000..1ad2b098 --- /dev/null +++ b/.brightsec/tests/get-rest-country-mapping.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/country-mapping', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['improper_asset_management', 'full_path_disclosure', 'csrf', 'open_database'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/country-mapping`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-deluxe-membership.test.ts b/.brightsec/tests/get-rest-deluxe-membership.test.ts new file mode 100644 index 00000000..0c510d8c --- /dev/null +++ b/.brightsec/tests/get-rest-deluxe-membership.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/deluxe-membership', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'business_constraint_bypass', 'xss', 'jwt'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/deluxe-membership`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-image-captcha.test.ts b/.brightsec/tests/get-rest-image-captcha.test.ts new file mode 100644 index 00000000..1121742c --- /dev/null +++ b/.brightsec/tests/get-rest-image-captcha.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/image-captcha', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'id_enumeration', 'secret_tokens', 'sqli'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/image-captcha`, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-languages.test.ts b/.brightsec/tests/get-rest-languages.test.ts new file mode 100644 index 00000000..4a5cc88c --- /dev/null +++ b/.brightsec/tests/get-rest-languages.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/languages', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['full_path_disclosure', 'xss', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/languages`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-memories.test.ts b/.brightsec/tests/get-rest-memories.test.ts new file mode 100644 index 00000000..840d2f45 --- /dev/null +++ b/.brightsec/tests/get-rest-memories.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/memories', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/memories`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-order-history-orders.test.ts b/.brightsec/tests/get-rest-order-history-orders.test.ts new file mode 100644 index 00000000..b1a57b91 --- /dev/null +++ b/.brightsec/tests/get-rest-order-history-orders.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/order-history/orders', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'nosql', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/order-history/orders`, + headers: { 'Authorization': 'Bearer ' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-order-history.test.ts b/.brightsec/tests/get-rest-order-history.test.ts new file mode 100644 index 00000000..3f8a0bc6 --- /dev/null +++ b/.brightsec/tests/get-rest-order-history.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/order-history', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'nosql', 'stored_xss', 'xss'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/order-history`, + headers: { + 'Authorization': 'Bearer ', + 'Content-Type': 'application/json' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-products-1-reviews.test.ts b/.brightsec/tests/get-rest-products-1-reviews.test.ts new file mode 100644 index 00000000..1a65a865 --- /dev/null +++ b/.brightsec/tests/get-rest-products-1-reviews.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/products/1/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['nosql', 'xss', 'csrf', 'id_enumeration', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/products/1/reviews`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-products-search.test.ts b/.brightsec/tests/get-rest-products-search.test.ts new file mode 100644 index 00000000..f0602c14 --- /dev/null +++ b/.brightsec/tests/get-rest-products-search.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/products/search?q=:query', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'full_path_disclosure', 'xss', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/products/search?q=apple`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-repeat-notification.test.ts b/.brightsec/tests/get-rest-repeat-notification.test.ts new file mode 100644 index 00000000..5b1a0dd5 --- /dev/null +++ b/.brightsec/tests/get-rest-repeat-notification.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/repeat-notification', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'csrf', 'business_constraint_bypass', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/repeat-notification?challenge=OWASP%20Top%2010`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-save-login-ip.test.ts b/.brightsec/tests/get-rest-save-login-ip.test.ts new file mode 100644 index 00000000..c444a88d --- /dev/null +++ b/.brightsec/tests/get-rest-save-login-ip.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/saveLoginIp', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'csrf', 'bopla', 'osi'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/saveLoginIp`, + headers: { 'true-client-ip': '192.168.1.1' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts b/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts new file mode 100644 index 00000000..f7679f36 --- /dev/null +++ b/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/snippets/fixes/sampleKey', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'full_path_disclosure', 'lfi', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/snippets/fixes/sampleKey`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-track-order-12345.test.ts b/.brightsec/tests/get-rest-track-order-12345.test.ts new file mode 100644 index 00000000..ac7b429e --- /dev/null +++ b/.brightsec/tests/get-rest-track-order-12345.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/track-order/:id', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['test/api/trackResultApiSpec.ts', 'test/cypress/e2e/trackOrder.spec.ts'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/track-order/12345`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-user-authentication-details.test.ts b/.brightsec/tests/get-rest-user-authentication-details.test.ts new file mode 100644 index 00000000..58a41aa0 --- /dev/null +++ b/.brightsec/tests/get-rest-user-authentication-details.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/user/authentication-details', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'xss', 'bopla', 'jwt'], + attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/user/authentication-details`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-user-change-password.test.ts b/.brightsec/tests/get-rest-user-change-password.test.ts new file mode 100644 index 00000000..2d47914b --- /dev/null +++ b/.brightsec/tests/get-rest-user-change-password.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/user/change-password', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'bopla', 'sqli', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/user/change-password?current=currentPassword123&new=newPassword123&repeat=newPassword123`, + headers: { 'X-Recruiting': 'undefined' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-user-security-question.test.ts b/.brightsec/tests/get-rest-user-security-question.test.ts new file mode 100644 index 00000000..56529ed2 --- /dev/null +++ b/.brightsec/tests/get-rest-user-security-question.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/user/security-question', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'id_enumeration', 'sqli', 'xss', 'email_injection'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/user/security-question?email=user@example.com`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-user-whoami.test.ts b/.brightsec/tests/get-rest-user-whoami.test.ts new file mode 100644 index 00000000..15deb0dc --- /dev/null +++ b/.brightsec/tests/get-rest-user-whoami.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/user/whoami', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'bopla', 'id_enumeration', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/user/whoami?callback=callbackFunction`, + headers: { 'X-Recruiting': '/#/jobs' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-wallet-balance.test.ts b/.brightsec/tests/get-rest-wallet-balance.test.ts new file mode 100644 index 00000000..49171321 --- /dev/null +++ b/.brightsec/tests/get-rest-wallet-balance.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/wallet/balance', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/wallet/balance`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts b/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts new file mode 100644 index 00000000..f378aca6 --- /dev/null +++ b/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/web3/nftMintListen', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['ssrf', 'secret_tokens', 'open_database', 'csrf', 'xss'], + attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/web3/nftMintListen`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts b/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts new file mode 100644 index 00000000..fef9ca8e --- /dev/null +++ b/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /rest/web3/nftUnlocked', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/rest/web3/nftUnlocked`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-security-txt.test.ts b/.brightsec/tests/get-security-txt.test.ts new file mode 100644 index 00000000..bb726b76 --- /dev/null +++ b/.brightsec/tests/get-security-txt.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /security.txt', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'xss'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/security.txt`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-snippets-sample-challenge.test.ts b/.brightsec/tests/get-snippets-sample-challenge.test.ts new file mode 100644 index 00000000..730715ad --- /dev/null +++ b/.brightsec/tests/get-snippets-sample-challenge.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /snippets/sample-challenge', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'csrf', 'id_enumeration', 'improper_asset_management', 'full_path_disclosure'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/snippets/sample-challenge`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-solve-challenges-server-side.test.ts b/.brightsec/tests/get-solve-challenges-server-side.test.ts new file mode 100644 index 00000000..994c4584 --- /dev/null +++ b/.brightsec/tests/get-solve-challenges-server-side.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /solve/challenges/server-side', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['ssti', 'ssrf', 'xss', 'csrf', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.QUERY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/solve/challenges/server-side?key=tRy_H4rd3r_n0thIng_iS_Imp0ssibl3`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-support-logs-file.test.ts b/.brightsec/tests/get-support-logs-file.test.ts new file mode 100644 index 00000000..36838679 --- /dev/null +++ b/.brightsec/tests/get-support-logs-file.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /support/logs/:file', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'full_path_disclosure', 'access_control', 'http_method_fuzzing'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/support/logs/testfile`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-support-logs-sample-log.test.ts b/.brightsec/tests/get-support-logs-sample-log.test.ts new file mode 100644 index 00000000..9cca1afa --- /dev/null +++ b/.brightsec/tests/get-support-logs-sample-log.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /support/logs/sample.log', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['lfi', 'ssrf', 'full_path_disclosure', 'improper_asset_management'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/support/logs/sample.log`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts b/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts new file mode 100644 index 00000000..b9f288bc --- /dev/null +++ b/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /this/page/is/hidden/behind/an/incredibly/high/paywall/that/could/only/be/unlocked/by/sending/1btc/to/us', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'id_enumeration', 'improper_asset_management', 'unvalidated_redirect', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/this/page/is/hidden/behind/an/incredibly/high/paywall/that/could/only/be/unlocked/by/sending/1btc/to/us`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-video.test.ts b/.brightsec/tests/get-video.test.ts new file mode 100644 index 00000000..9ddfc7b8 --- /dev/null +++ b/.brightsec/tests/get-video.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /video', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'full_path_disclosure', 'ssrf', 'lfi'], + attackParamLocations: [AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/video`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts b/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts new file mode 100644 index 00000000..61c434d7 --- /dev/null +++ b/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /we/may/also/instruct/you/to/refuse/all/reasonably/necessary/responsibility', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'full_path_disclosure', 'improper_asset_management', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/we/may/also/instruct/you/to/refuse/all/reasonably/necessary/responsibility`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-well-known-samplefile.test.ts b/.brightsec/tests/get-well-known-samplefile.test.ts new file mode 100644 index 00000000..90fa87c4 --- /dev/null +++ b/.brightsec/tests/get-well-known-samplefile.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /.well-known/samplefile', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['improper_asset_management', 'full_path_disclosure', 'lfi', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/.well-known/samplefile`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-well-known-security-txt.test.ts b/.brightsec/tests/get-well-known-security-txt.test.ts new file mode 100644 index 00000000..3288bec3 --- /dev/null +++ b/.brightsec/tests/get-well-known-security-txt.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /.well-known/security.txt', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/.well-known/security.txt`, + headers: { 'X-Recruiting': '/#/jobs' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/get-well-known.test.ts b/.brightsec/tests/get-well-known.test.ts new file mode 100644 index 00000000..bcf047eb --- /dev/null +++ b/.brightsec/tests/get-well-known.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('GET /.well-known', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['improper_asset_management', 'full_path_disclosure', 'lfi', 'xss'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.GET, + url: `${baseUrl}/.well-known`, + headers: { 'X-Recruiting': '' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/patch-rest-products-reviews.test.ts b/.brightsec/tests/patch-rest-products-reviews.test.ts new file mode 100644 index 00000000..15448624 --- /dev/null +++ b/.brightsec/tests/patch-rest-products-reviews.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PATCH /rest/products/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'nosql', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PATCH, + url: `${baseUrl}/rest/products/reviews`, + body: { + id: '507f1f77bcf86cd799439011', + message: 'Updated review message.' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-addresss.test.ts b/.brightsec/tests/post-api-addresss.test.ts new file mode 100644 index 00000000..16d2982c --- /dev/null +++ b/.brightsec/tests/post-api-addresss.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/addresss', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Addresss`, + body: { + UserId: 123, + street: '123 Main St', + city: 'Metropolis', + state: 'NY', + zip: '12345' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-basket-items.test.ts b/.brightsec/tests/post-api-basket-items.test.ts new file mode 100644 index 00000000..e7d13b18 --- /dev/null +++ b/.brightsec/tests/post-api-basket-items.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/BasketItems', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/BasketItems`, + body: { + ProductId: 1, + BasketId: 1, + quantity: 2 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-cards.test.ts b/.brightsec/tests/post-api-cards.test.ts new file mode 100644 index 00000000..da1ad64e --- /dev/null +++ b/.brightsec/tests/post-api-cards.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/cards', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Cards`, + body: { + UserId: 1, + fullName: 'John Doe', + cardNum: '1234567812345678', + expMonth: 12, + expYear: 2025 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-challenges.test.ts b/.brightsec/tests/post-api-challenges.test.ts new file mode 100644 index 00000000..017fb9b7 --- /dev/null +++ b/.brightsec/tests/post-api-challenges.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/challenges', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'xss', 'sqli', 'osi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Challenges`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-complaints-1.test.ts b/.brightsec/tests/post-api-complaints-1.test.ts new file mode 100644 index 00000000..b66e6762 --- /dev/null +++ b/.brightsec/tests/post-api-complaints-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'file_upload', 'xss', 'osi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Complaints/1`, + body: { + UserId: 123, + message: 'This is a sample complaint message.', + file: 'complaint_document.pdf' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-feedbacks.test.ts b/.brightsec/tests/post-api-feedbacks.test.ts new file mode 100644 index 00000000..33913cfd --- /dev/null +++ b/.brightsec/tests/post-api-feedbacks.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/feedbacks', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'bopla', 'sqli', 'stored_xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Feedbacks`, + body: { + UserId: 123, + comment: 'Great service!', + rating: 5 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-privacy-requests-1.test.ts b/.brightsec/tests/post-api-privacy-requests-1.test.ts new file mode 100644 index 00000000..45acef19 --- /dev/null +++ b/.brightsec/tests/post-api-privacy-requests-1.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/privacy-requests/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/PrivacyRequests/1`, + body: { + email: 'user@example.com', + securityAnswer: 'correct_answer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-privacy-requests.test.ts b/.brightsec/tests/post-api-privacy-requests.test.ts new file mode 100644 index 00000000..26839953 --- /dev/null +++ b/.brightsec/tests/post-api-privacy-requests.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/privacy-requests', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'xss', 'sqli', 'email_injection', 'osi', 'nosql', 'xxe'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/PrivacyRequests`, + body: { + email: 'user@example.com', + securityAnswer: 'mySecurityAnswer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-products.test.ts b/.brightsec/tests/post-api-products.test.ts new file mode 100644 index 00000000..b13263fe --- /dev/null +++ b/.brightsec/tests/post-api-products.test.ts @@ -0,0 +1,46 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/products', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'sqli', 'xss', 'bopla', 'file_upload'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Products`, + body: { + name: 'Sample Product', + description: 'A sample product description.', + price: 19.99, + deluxePrice: 29.99, + image: 'sample-image.png' + }, + headers: { + 'Content-Type': 'application/json', + 'X-Recruiting': '' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-quantitys-1.test.ts b/.brightsec/tests/post-api-quantitys-1.test.ts new file mode 100644 index 00000000..1641283c --- /dev/null +++ b/.brightsec/tests/post-api-quantitys-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/quantitys/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'csrf', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Quantitys/1`, + body: { + ProductId: 1, + quantity: 100, + limitPerUser: 5 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-quantitys.test.ts b/.brightsec/tests/post-api-quantitys.test.ts new file mode 100644 index 00000000..bd879e74 --- /dev/null +++ b/.brightsec/tests/post-api-quantitys.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/quantitys', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Quantitys`, + body: { + ProductId: 1, + quantity: 10, + limitPerUser: 5 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-recycles.test.ts b/.brightsec/tests/post-api-recycles.test.ts new file mode 100644 index 00000000..706ba0fd --- /dev/null +++ b/.brightsec/tests/post-api-recycles.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/recycles', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'bopla', 'csrf', 'date_manipulation', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Recycles`, + body: { + UserId: 1, + AddressId: 1, + quantity: 10, + isPickup: true, + date: '2023-10-05T14:48:00.000Z' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-security-answers-1.test.ts b/.brightsec/tests/post-api-security-answers-1.test.ts new file mode 100644 index 00000000..30e4ba42 --- /dev/null +++ b/.brightsec/tests/post-api-security-answers-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'sqli', 'xss', 'csrf', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/SecurityAnswers/1`, + body: { + answer: 'hashed_answer_example', + UserId: 1, + SecurityQuestionId: 1 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-security-answers.test.ts b/.brightsec/tests/post-api-security-answers.test.ts new file mode 100644 index 00000000..53b8033f --- /dev/null +++ b/.brightsec/tests/post-api-security-answers.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/security-answers', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'sqli', 'xss', 'csrf', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/SecurityAnswers`, + body: { + SecurityQuestionId: 1, + UserId: 123, + answer: 'hashed_answer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-api-security-questions-1.test.ts b/.brightsec/tests/post-api-security-questions-1.test.ts new file mode 100644 index 00000000..4be18a45 --- /dev/null +++ b/.brightsec/tests/post-api-security-questions-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/SecurityQuestions/1`, + body: { + SecurityQuestionId: 1, + UserId: 1, + answer: 'hashed_answer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-users.test.ts b/.brightsec/tests/post-api-users.test.ts new file mode 100644 index 00000000..27e08962 --- /dev/null +++ b/.brightsec/tests/post-api-users.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /api/users', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'sqli', 'csrf', 'bopla', 'proto_pollution', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/api/Users`, + body: { + email: 'user@example.com', + password: 'securePassword123', + passwordRepeat: 'securePassword123' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-b2b-v2-orders.test.ts b/.brightsec/tests/post-b2b-v2-orders.test.ts new file mode 100644 index 00000000..2fe1b339 --- /dev/null +++ b/.brightsec/tests/post-b2b-v2-orders.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /b2b/v2/orders', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['osi', 'ssrf', 'sqli', 'rfi', 'ssti', 'xss', 'csrf', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/b2b/v2/orders`, + body: { + cid: 'exampleCID', + orderLinesData: 'exampleOrderLinesData' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-dataerasure.test.ts b/.brightsec/tests/post-dataerasure.test.ts new file mode 100644 index 00000000..15d59604 --- /dev/null +++ b/.brightsec/tests/post-dataerasure.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /dataerasure', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'lfi', 'osi', 'xss', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/dataerasure`, + body: { + email: 'user@example.com', + securityAnswer: 'correct_answer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-file-upload.test.ts b/.brightsec/tests/post-file-upload.test.ts new file mode 100644 index 00000000..23d6dc92 --- /dev/null +++ b/.brightsec/tests/post-file-upload.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /file-upload', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['file_upload', 'ssrf', 'xxe', 'insecure_tls_configuration'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/file-upload`, + headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, + body: { + mimeType: 'multipart/form-data', + text: '--boundary\r\nContent-Disposition: form-data; name="file"; filename="example.zip"\r\nContent-Type: application/zip\r\n\r\n\r\n--boundary--' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-profile-image-file.test.ts b/.brightsec/tests/post-profile-image-file.test.ts new file mode 100644 index 00000000..99624302 --- /dev/null +++ b/.brightsec/tests/post-profile-image-file.test.ts @@ -0,0 +1,37 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /profile/image/file', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['file_upload', 'xss', 'csrf', 'ssrf', 'osi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/profile/image/file`, + headers: { 'Content-Type': 'multipart/form-data' }, + body: `--boundary\r\nContent-Disposition: form-data; name="file"; filename="profile.jpg"\r\nContent-Type: image/jpeg\r\n\r\n\r\n--boundary--`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-profile-image-url.test.ts b/.brightsec/tests/post-profile-image-url.test.ts new file mode 100644 index 00000000..1de2a957 --- /dev/null +++ b/.brightsec/tests/post-profile-image-url.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /profile/image/url', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['ssrf', 'file_upload', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/profile/image/url`, + body: { + imageUrl: 'http://example.com/image.jpg' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-profile.test.ts b/.brightsec/tests/post-profile.test.ts new file mode 100644 index 00000000..becd855b --- /dev/null +++ b/.brightsec/tests/post-profile.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /profile', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'xss', 'sqli', 'proto_pollution'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/profile`, + body: { + username: 'newUsername' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-2fa-disable.test.ts b/.brightsec/tests/post-rest-2fa-disable.test.ts new file mode 100644 index 00000000..cf4e428e --- /dev/null +++ b/.brightsec/tests/post-rest-2fa-disable.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/2fa/disable', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'osi', 'secret_tokens', 'jwt'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/2fa/disable`, + body: { + password: 'examplePassword123' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-2fa-setup.test.ts b/.brightsec/tests/post-rest-2fa-setup.test.ts new file mode 100644 index 00000000..3ae58371 --- /dev/null +++ b/.brightsec/tests/post-rest-2fa-setup.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/2fa/setup', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'jwt', 'secret_tokens', 'osi', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/2fa/setup`, + body: { + password: 'userPassword123', + setupToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXQiOiJzZWNyZXRUb3RwU2VjcmV0IiwidHlwZSI6InRvdHBfc2V0dXBfc2VjcmV0In0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c', + initialToken: '123456' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-2fa-verify.test.ts b/.brightsec/tests/post-rest-2fa-verify.test.ts new file mode 100644 index 00000000..d33a0fdf --- /dev/null +++ b/.brightsec/tests/post-rest-2fa-verify.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/2fa/verify', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'jwt', 'secret_tokens', 'xss', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/2fa/verify`, + body: { + tmpToken: 'sampleTmpToken123', + totpToken: '123456' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-basket-1-checkout.test.ts b/.brightsec/tests/post-rest-basket-1-checkout.test.ts new file mode 100644 index 00000000..c26e1fea --- /dev/null +++ b/.brightsec/tests/post-rest-basket-1-checkout.test.ts @@ -0,0 +1,44 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/basket/1/checkout', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'business_constraint_bypass', 'sqli', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/basket/1/checkout`, + body: { + orderDetails: { + deliveryMethodId: 1, + paymentId: 'wallet', + addressId: 1 + }, + UserId: 1 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-chatbot-respond.test.ts b/.brightsec/tests/post-rest-chatbot-respond.test.ts new file mode 100644 index 00000000..2a417549 --- /dev/null +++ b/.brightsec/tests/post-rest-chatbot-respond.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/chatbot/respond', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['jwt', 'xss', 'nosql', 'csrf', 'osi'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/chatbot/respond`, + body: { + action: 'query', + query: 'Hello, how are you?' + }, + headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-deluxe-membership.test.ts b/.brightsec/tests/post-rest-deluxe-membership.test.ts new file mode 100644 index 00000000..25e17e7f --- /dev/null +++ b/.brightsec/tests/post-rest-deluxe-membership.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/deluxe-membership', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/deluxe-membership`, + body: { + UserId: 123, + paymentMode: 'wallet', + paymentId: 456 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-memories.test.ts b/.brightsec/tests/post-rest-memories.test.ts new file mode 100644 index 00000000..069b961f --- /dev/null +++ b/.brightsec/tests/post-rest-memories.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/memories', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['file_upload', 'bopla', 'stored_xss', 'sqli'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/memories`, + body: { + caption: 'A beautiful sunset', + UserId: 1 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-products-reviews.test.ts b/.brightsec/tests/post-rest-products-reviews.test.ts new file mode 100644 index 00000000..2a59e95b --- /dev/null +++ b/.brightsec/tests/post-rest-products-reviews.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/products/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'nosql', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/products/reviews`, + body: { + message: 'Great product!', + author: 'user@example.com' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-user-data-export.test.ts b/.brightsec/tests/post-rest-user-data-export.test.ts new file mode 100644 index 00000000..f88999e5 --- /dev/null +++ b/.brightsec/tests/post-rest-user-data-export.test.ts @@ -0,0 +1,42 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/user/data-export', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'nosql', 'xss', 'csrf', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/user/data-export`, + body: { + UserId: '1' + }, + headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-user-login.test.ts b/.brightsec/tests/post-rest-user-login.test.ts new file mode 100644 index 00000000..0ed1fa2f --- /dev/null +++ b/.brightsec/tests/post-rest-user-login.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/user/login', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'csrf', 'xss', 'jwt', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/user/login`, + body: { + email: 'user@example.com', + password: 'securePassword123' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-user-reset-password.test.ts b/.brightsec/tests/post-rest-user-reset-password.test.ts new file mode 100644 index 00000000..07a99ffe --- /dev/null +++ b/.brightsec/tests/post-rest-user-reset-password.test.ts @@ -0,0 +1,42 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/user/reset-password', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'email_injection', 'bopla', 'xss', 'sqli', 'osi', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/user/reset-password`, + body: { + email: 'user@example.com', + answer: 'correct_answer', + new: 'new_password', + repeat: 'new_password' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-web3-submit-key.test.ts b/.brightsec/tests/post-rest-web3-submit-key.test.ts new file mode 100644 index 00000000..532d8d99 --- /dev/null +++ b/.brightsec/tests/post-rest-web3-submit-key.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/web3/submitKey', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['osi', 'csrf', 'xss', 'secret_tokens', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/web3/submitKey`, + body: { + walletAddress: '0x1234567890abcdef1234567890abcdef12345678' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts b/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts new file mode 100644 index 00000000..1d01227f --- /dev/null +++ b/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/web3/walletExploitAddress', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['ssrf', 'osi', 'xss', 'csrf', 'jwt'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/web3/walletExploitAddress`, + body: { + walletAddress: '0x1234567890abcdef1234567890abcdef12345678' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts b/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts new file mode 100644 index 00000000..bc4153c1 --- /dev/null +++ b/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /rest/web3/walletNFTVerify', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'xss', 'nosql', 'osi', 'secret_tokens'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/rest/web3/walletNFTVerify`, + body: { + walletAddress: '0x1234567890abcdef1234567890abcdef12345678' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/post-snippets-fixes.test.ts b/.brightsec/tests/post-snippets-fixes.test.ts new file mode 100644 index 00000000..43cac909 --- /dev/null +++ b/.brightsec/tests/post-snippets-fixes.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /snippets/fixes', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'xss', 'sqli', 'lfi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/snippets/fixes`, + body: { + key: 'exampleKey', + selectedFix: 1 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/post-snippets-verdict.test.ts b/.brightsec/tests/post-snippets-verdict.test.ts new file mode 100644 index 00000000..4a70ac29 --- /dev/null +++ b/.brightsec/tests/post-snippets-verdict.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('POST /snippets/verdict', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['xss', 'sqli', 'csrf', 'bopla', 'osi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.POST, + url: `${baseUrl}/snippets/verdict`, + body: { + selectedLines: [1, 2, 3], + key: 'exampleKey' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-addresses-1.test.ts b/.brightsec/tests/put-api-addresses-1.test.ts new file mode 100644 index 00000000..417d12c3 --- /dev/null +++ b/.brightsec/tests/put-api-addresses-1.test.ts @@ -0,0 +1,45 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/addresses/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Addresses/1`, + body: { + fullName: 'John Doe', + mobileNum: 1234567890, + zipCode: '12345', + streetAddress: '123 Main St', + city: 'Metropolis', + state: 'NY', + country: 'USA' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-addresss-1.test.ts b/.brightsec/tests/put-api-addresss-1.test.ts new file mode 100644 index 00000000..0c4e28d1 --- /dev/null +++ b/.brightsec/tests/put-api-addresss-1.test.ts @@ -0,0 +1,45 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Addresss/1`, + body: { + fullName: 'John Doe', + mobileNum: 1234567890, + zipCode: '12345', + streetAddress: '123 Main St', + city: 'Anytown', + state: 'CA', + country: 'USA' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-basketitems-1.test.ts b/.brightsec/tests/put-api-basketitems-1.test.ts new file mode 100644 index 00000000..a3180dab --- /dev/null +++ b/.brightsec/tests/put-api-basketitems-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/BasketItems/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'business_constraint_bypass', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/BasketItems/1`, + body: { + ProductId: 1, + BasketId: 1, + quantity: 2 + }, + headers: { 'Content-Type': 'application/json', 'X-Recruiting': '[value from config]' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-cards-1.test.ts b/.brightsec/tests/put-api-cards-1.test.ts new file mode 100644 index 00000000..ad467fb6 --- /dev/null +++ b/.brightsec/tests/put-api-cards-1.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'date_manipulation', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Cards/1`, + body: { + UserId: 1, + fullName: 'John Doe', + cardNum: 1234567812345678, + expMonth: 12, + expYear: 2090 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-challenges-1.test.ts b/.brightsec/tests/put-api-challenges-1.test.ts new file mode 100644 index 00000000..648c2dbb --- /dev/null +++ b/.brightsec/tests/put-api-challenges-1.test.ts @@ -0,0 +1,52 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'xss', 'sqli', 'osi'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Challenges/1`, + body: { + name: "New Challenge Name", + category: "Category Example", + description: "This is a description of the challenge.", + difficulty: 3, + hint: "This is a hint.", + hintUrl: "http://example.com/hint", + mitigationUrl: "http://example.com/mitigation", + key: "restfulXssChallenge", + disabledEnv: "production", + tutorialOrder: 1, + tags: "tag1,tag2", + solved: false, + codingChallengeStatus: 0, + hasCodingChallenge: true + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-complaints-1.test.ts b/.brightsec/tests/put-api-complaints-1.test.ts new file mode 100644 index 00000000..e1c19c3b --- /dev/null +++ b/.brightsec/tests/put-api-complaints-1.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/Complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'file_upload', 'sqli', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Complaints/1`, + body: { + message: 'This is a sample complaint message.', + file: 'complaint_document.pdf' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-feedbacks-1.test.ts b/.brightsec/tests/put-api-feedbacks-1.test.ts new file mode 100644 index 00000000..d1d96257 --- /dev/null +++ b/.brightsec/tests/put-api-feedbacks-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/Feedbacks/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'xss', 'sqli'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Feedbacks/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-privacyrequests-1.test.ts b/.brightsec/tests/put-api-privacyrequests-1.test.ts new file mode 100644 index 00000000..7365610b --- /dev/null +++ b/.brightsec/tests/put-api-privacyrequests-1.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/PrivacyRequests/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/PrivacyRequests/1`, + body: { + UserId: 123, + deletionRequested: true + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-quantitys-1.test.ts b/.brightsec/tests/put-api-quantitys-1.test.ts new file mode 100644 index 00000000..4873ed74 --- /dev/null +++ b/.brightsec/tests/put-api-quantitys-1.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/Quantitys/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Quantitys/1`, + body: { + ProductId: 123, + quantity: 10, + limitPerUser: 5 + }, + headers: { 'Content-Type': 'application/json', 'X-Recruiting': 'Your Company Name' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-recycles-1.test.ts b/.brightsec/tests/put-api-recycles-1.test.ts new file mode 100644 index 00000000..9a90add2 --- /dev/null +++ b/.brightsec/tests/put-api-recycles-1.test.ts @@ -0,0 +1,43 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['sqli', 'bopla', 'csrf', 'id_enumeration', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Recycles/1`, + body: { + UserId: 1, + AddressId: 1, + quantity: 10, + isPickup: true, + date: "2023-10-01T00:00:00Z" + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-security-answers-1.test.ts b/.brightsec/tests/put-api-security-answers-1.test.ts new file mode 100644 index 00000000..e96c320c --- /dev/null +++ b/.brightsec/tests/put-api-security-answers-1.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'sqli', 'xss', 'csrf'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/SecurityAnswers/1`, + body: { + answer: 'exampleAnswer' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-security-questions-1.test.ts b/.brightsec/tests/put-api-security-questions-1.test.ts new file mode 100644 index 00000000..064b558b --- /dev/null +++ b/.brightsec/tests/put-api-security-questions-1.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/SecurityQuestions/1`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-api-users-1.test.ts b/.brightsec/tests/put-api-users-1.test.ts new file mode 100644 index 00000000..9d8647ef --- /dev/null +++ b/.brightsec/tests/put-api-users-1.test.ts @@ -0,0 +1,42 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /api/users/1', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'id_enumeration', 'jwt', 'xss'], + attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/api/Users/1`, + body: { + username: 'newUsername' + }, + headers: { + 'Authorization': 'Bearer ', + 'Content-Type': 'application/json' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file diff --git a/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts b/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts new file mode 100644 index 00000000..1188b18e --- /dev/null +++ b/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts @@ -0,0 +1,36 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/basket/1/coupon/validCoupon', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'sqli', 'xss', 'business_constraint_bypass'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/basket/1/coupon/validCoupon`, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts b/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts new file mode 100644 index 00000000..f5fe321a --- /dev/null +++ b/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/continue-code/apply/exampleCode123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'csrf', 'unvalidated_redirect'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/continue-code/apply/exampleCode123`, + body: { + continueCode: 'exampleCode123' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts b/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts new file mode 100644 index 00000000..81c44373 --- /dev/null +++ b/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts @@ -0,0 +1,39 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/continue-code-findIt/apply/abc123', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'proto_pollution', 'unvalidated_redirect', 'xss'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/continue-code-findIt/apply/abc123`, + body: { + continueCode: 'abc123' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts b/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts new file mode 100644 index 00000000..67d4d849 --- /dev/null +++ b/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts @@ -0,0 +1,35 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/continue-code-fixIt/apply/:id', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'unvalidated_redirect', 'sqli', 'xss'], + attackParamLocations: [AttackParamLocation.PATH], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/continue-code-fixIt/apply/abc123`, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts b/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts new file mode 100644 index 00000000..cd41232e --- /dev/null +++ b/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts @@ -0,0 +1,42 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/order-history/:id/delivery-status', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['csrf', 'bopla', 'id_enumeration', 'nosql'], + attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.BODY, AttackParamLocation.HEADER], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/order-history/123/delivery-status`, + body: { + deliveryStatus: true + }, + headers: { + 'Content-Type': 'application/json', + 'X-Recruiting': 'We are hiring!' + }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-products-id-reviews.test.ts b/.brightsec/tests/put-rest-products-id-reviews.test.ts new file mode 100644 index 00000000..0466c130 --- /dev/null +++ b/.brightsec/tests/put-rest-products-id-reviews.test.ts @@ -0,0 +1,40 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/products/:id/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['nosql', 'stored_xss', 'csrf', 'bopla'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/products/507f1f77bcf86cd799439011/reviews`, + body: { + id: '507f1f77bcf86cd799439011', + message: 'Updated review message.' + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); diff --git a/.brightsec/tests/put-rest-wallet-balance.test.ts b/.brightsec/tests/put-rest-wallet-balance.test.ts new file mode 100644 index 00000000..15c8cbd8 --- /dev/null +++ b/.brightsec/tests/put-rest-wallet-balance.test.ts @@ -0,0 +1,41 @@ +import { test, before, after } from 'node:test'; +import { SecRunner } from '@sectester/runner'; +import { AttackParamLocation, HttpMethod } from '@sectester/scan'; + +const timeout = 40 * 60 * 1000; +const baseUrl = process.env.BRIGHT_TARGET_URL!; + +let runner!: SecRunner; + +before(async () => { + runner = new SecRunner({ + hostname: process.env.BRIGHT_HOSTNAME!, + projectId: process.env.BRIGHT_PROJECT_ID! + }); + + await runner.init(); +}); + +after(() => runner.clear()); + +test('PUT /rest/wallet/balance', { signal: AbortSignal.timeout(timeout) }, async () => { + await runner + .createScan({ + tests: ['bopla', 'sqli', 'csrf', 'xss', 'id_enumeration'], + attackParamLocations: [AttackParamLocation.BODY], + starMetadata: {} + }) + .setFailFast(false) + .timeout(timeout) + .run({ + method: HttpMethod.PUT, + url: `${baseUrl}/rest/wallet/balance`, + body: { + UserId: 1, + paymentId: 123, + balance: 100 + }, + headers: { 'Content-Type': 'application/json' }, + auth: process.env.BRIGHT_AUTH_ID + }); +}); \ No newline at end of file From 85fb3da59d72418a1f2f3d67c70a36ce4589824b Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 20:11:16 +0400 Subject: [PATCH 4/6] ci: add CI workflow to run e2e security tests --- .github/workflows/bright.yml | 63 +++++++++++++++++++ .../configure-bright-credentials/action.yaml | 53 ++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 .github/workflows/bright.yml create mode 100644 .github/workflows/composite/configure-bright-credentials/action.yaml diff --git a/.github/workflows/bright.yml b/.github/workflows/bright.yml new file mode 100644 index 00000000..45d70191 --- /dev/null +++ b/.github/workflows/bright.yml @@ -0,0 +1,63 @@ +name: Bright +on: + pull_request: + branches: + - '**' + +permissions: + checks: write + contents: read + id-token: write + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + + - name: Install application dependencies + run: | + npm install --ignore-scripts + cd frontend + npm install --ignore-scripts --legacy-peer-deps + + - name: Build Docker image and start application + run: | + docker build -t juice-shop . + docker run -d -p 3000:3000 --name juice-shop-app juice-shop + + - name: Wait for application to be ready + run: | + until nc -zv 127.0.0.1 3000; do + echo "Waiting for application to be ready..." + sleep 5 + done + + - name: Set up Node.js latest + uses: actions/setup-node@v4 + with: + node-version: '>=22' + + - name: Install SecTesterJS dependencies + run: npm i --save=false --prefix .brightsec @sectester/core @sectester/repeater @sectester/scan @sectester/runner @sectester/reporter + + - name: Run security tests + env: + BRIGHT_HOSTNAME: ${{ vars.BRIGHT_HOSTNAME }} + BRIGHT_PROJECT_ID: ${{ vars.BRIGHT_PROJECT_ID }} + BRIGHT_AUTH_ID: ${{ vars.BRIGHT_AUTH_ID }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRIGHT_TOKEN: ${{ secrets.BRIGHT_TOKEN }} + BRIGHT_TARGET_URL: http://127.0.0.1:3000 + run: | + node --experimental-transform-types --experimental-strip-types --experimental-detect-module --disable-warning=MODULE_TYPELESS_PACKAGE_JSON --disable-warning=ExperimentalWarning --test-force-exit --test-concurrency=4 --test .brightsec/tests/*.test.ts + + - name: Clean up + run: docker stop juice-shop-app && docker rm juice-shop-app \ No newline at end of file diff --git a/.github/workflows/composite/configure-bright-credentials/action.yaml b/.github/workflows/composite/configure-bright-credentials/action.yaml new file mode 100644 index 00000000..84983846 --- /dev/null +++ b/.github/workflows/composite/configure-bright-credentials/action.yaml @@ -0,0 +1,53 @@ +name: 'Configure BrightSec credentials' + +inputs: + BRIGHT_HOSTNAME: + description: 'Hostname for the BrightSec environment' + required: true + BRIGHT_PROJECT_ID: + description: 'Project ID for BrightSec' + required: true + BRIGHT_TOKEN: + description: 'Pre-configured token' + required: false + +runs: + using: 'composite' + steps: + - id: configure_env_from_input + name: 'Set existing token in env' + shell: bash + if: ${{ inputs.BRIGHT_TOKEN != '' }} + env: + BRIGHT_TOKEN: ${{ inputs.BRIGHT_TOKEN }} + run: | + echo "BRIGHT_TOKEN=${BRIGHT_TOKEN}" >> $GITHUB_ENV + + - id: configure_bright_credentials_through_oidc + name: 'Exchange OIDC credentials for Bright token' + shell: bash + if: ${{ inputs.BRIGHT_TOKEN == '' }} + env: + BRIGHT_HOSTNAME: ${{ inputs.BRIGHT_HOSTNAME }} + BRIGHT_PROJECT_ID: ${{ inputs.BRIGHT_PROJECT_ID }} + run: | + # Retrieve OIDC token from GitHub + OIDC_TOKEN=$(curl -sS -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ + "${ACTIONS_ID_TOKEN_REQUEST_URL}" | jq -r '.value') + + # Post the token to BrightSec + RESPONSE=$(curl -s -X POST "https://${BRIGHT_HOSTNAME}/api/v1/projects/${BRIGHT_PROJECT_ID}/api-keys/oidc" \ + -H "Content-Type: application/json" \ + -d "{\"token\": \"${OIDC_TOKEN}\"}") + + if ! echo "$RESPONSE" | jq -e . > /dev/null 2>&1; then + echo "Error: $RESPONSE" 1>&2 + exit 1 + fi + + # Extract the pureKey + PURE_KEY=$(echo "$RESPONSE" | jq -r '.pureKey') + + # Mask and store in environment + echo "::add-mask::$PURE_KEY" + echo "BRIGHT_TOKEN=$PURE_KEY" >> $GITHUB_ENV From caee6a3ec63ac1e4ff37cfe23603bfcfbb8e9710 Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 23:51:30 +0400 Subject: [PATCH 5/6] test: remove completed test files that are no longer relevant skip-checks:true --- .../tests/delete-api-addresss-1.test.ts | 36 ------------- .../tests/delete-api-basketitems-1.test.ts | 36 ------------- .brightsec/tests/delete-api-cards-1.test.ts | 35 ------------- .../tests/delete-api-challenges-1.test.ts | 35 ------------- .../tests/delete-api-complaints-1.test.ts | 39 -------------- .../delete-api-privacy-requests-1.test.ts | 36 ------------- .../tests/delete-api-products-1.test.ts | 35 ------------- .../tests/delete-api-quantitys-123.test.ts | 36 ------------- .../tests/delete-api-recycles-1.test.ts | 35 ------------- .../delete-api-security-questions-1.test.ts | 35 ------------- .../delete-api-securityanswers-1.test.ts | 35 ------------- .brightsec/tests/delete-api-users-123.test.ts | 36 ------------- .brightsec/tests/get-api-addresss-1.test.ts | 35 ------------- .brightsec/tests/get-api-addresss.test.ts | 36 ------------- .../tests/get-api-basket-items-1.test.ts | 36 ------------- .brightsec/tests/get-api-basket-items.test.ts | 36 ------------- .brightsec/tests/get-api-cards-1.test.ts | 35 ------------- .brightsec/tests/get-api-cards.test.ts | 35 ------------- .brightsec/tests/get-api-challenges-1.test.ts | 36 ------------- .brightsec/tests/get-api-challenges.test.ts | 35 ------------- .brightsec/tests/get-api-complaints-1.test.ts | 35 ------------- .brightsec/tests/get-api-complaints.test.ts | 36 ------------- .brightsec/tests/get-api-deliverys-1.test.ts | 35 ------------- .brightsec/tests/get-api-deliverys.test.ts | 35 ------------- .brightsec/tests/get-api-docs.test.ts | 35 ------------- .brightsec/tests/get-api-feedbacks-1.test.ts | 36 ------------- .brightsec/tests/get-api-feedbacks.test.ts | 35 ------------- .../tests/get-api-privacy-requests.test.ts | 35 ------------- .brightsec/tests/get-api-products-1.test.ts | 36 ------------- .brightsec/tests/get-api-products.test.ts | 35 ------------- .../tests/get-api-quantitys-123.test.ts | 35 ------------- .brightsec/tests/get-api-quantitys.test.ts | 35 ------------- .brightsec/tests/get-api-recycles-1.test.ts | 35 ------------- .../tests/get-api-security-answers-1.test.ts | 35 ------------- .../tests/get-api-security-answers.test.ts | 35 ------------- .../tests/get-api-security-questions.test.ts | 35 ------------- .brightsec/tests/get-api-users-123.test.ts | 36 ------------- .brightsec/tests/get-api-users.test.ts | 36 ------------- .brightsec/tests/get-assets-i18n.test.ts | 35 ------------- .../get-assets-public-images-padding.test.ts | 35 ------------- .../get-assets-public-images-products.test.ts | 35 ------------- .../get-assets-public-images-uploads.test.ts | 35 ------------- .brightsec/tests/get-dataerasure.test.ts | 36 ------------- .../get-encryptionkeys-samplefile-key.test.ts | 35 ------------- .../get-encryptionkeys-samplekeyfile.test.ts | 35 ------------- .../tests/get-ftp-sample-file-md.test.ts | 35 ------------- .brightsec/tests/get-ftp-sample-md.test.ts | 36 ------------- .brightsec/tests/get-metrics.test.ts | 36 ------------- .brightsec/tests/get-profile.test.ts | 38 -------------- .brightsec/tests/get-promotion.test.ts | 35 ------------- .brightsec/tests/get-redirect-to-url.test.ts | 35 ------------- .brightsec/tests/get-rest-2fa-status.test.ts | 35 ------------- ...st-admin-application-configuration.test.ts | 36 ------------- ...get-rest-admin-application-version.test.ts | 36 ------------- .../tests/get-rest-basket-1-order.test.ts | 35 ------------- .brightsec/tests/get-rest-basket-1.test.ts | 36 ------------- .brightsec/tests/get-rest-captcha.test.ts | 35 ------------- .../get-rest-continue-code-findit.test.ts | 35 ------------- .../get-rest-continue-code-fixit.test.ts | 35 ------------- .../tests/get-rest-continue-code.test.ts | 35 ------------- .../tests/get-rest-country-mapping.test.ts | 35 ------------- .../tests/get-rest-deluxe-membership.test.ts | 35 ------------- .../tests/get-rest-image-captcha.test.ts | 36 ------------- .brightsec/tests/get-rest-languages.test.ts | 35 ------------- .brightsec/tests/get-rest-memories.test.ts | 35 ------------- .../get-rest-order-history-orders.test.ts | 36 ------------- .../tests/get-rest-order-history.test.ts | 39 -------------- .../tests/get-rest-products-1-reviews.test.ts | 35 ------------- .../get-rest-repeat-notification.test.ts | 35 ------------- .../tests/get-rest-save-login-ip.test.ts | 36 ------------- .../get-rest-snippets-fixes-samplekey.test.ts | 35 ------------- .../tests/get-rest-track-order-12345.test.ts | 35 ------------- .../get-rest-user-change-password.test.ts | 36 ------------- .../get-rest-user-security-question.test.ts | 35 ------------- .brightsec/tests/get-rest-user-whoami.test.ts | 36 ------------- .../tests/get-rest-wallet-balance.test.ts | 35 ------------- .../get-rest-web3-nft-mint-listen.test.ts | 35 ------------- .../tests/get-rest-web3-nft-unlocked.test.ts | 35 ------------- .brightsec/tests/get-security-txt.test.ts | 36 ------------- .../get-snippets-sample-challenge.test.ts | 35 ------------- .../get-solve-challenges-server-side.test.ts | 35 ------------- .../tests/get-support-logs-file.test.ts | 35 ------------- .../tests/get-support-logs-sample-log.test.ts | 35 ------------- ...-be-unlocked-by-sending-1btc-to-us.test.ts | 35 ------------- .brightsec/tests/get-video.test.ts | 36 ------------- ...easonably-necessary-responsibility.test.ts | 35 ------------- .../tests/get-well-known-samplefile.test.ts | 35 ------------- .../tests/get-well-known-security-txt.test.ts | 36 ------------- .brightsec/tests/get-well-known.test.ts | 36 ------------- .../tests/patch-rest-products-reviews.test.ts | 40 -------------- .../tests/post-api-basket-items.test.ts | 41 --------------- .brightsec/tests/post-api-cards.test.ts | 43 --------------- .brightsec/tests/post-api-challenges.test.ts | 35 ------------- .../tests/post-api-complaints-1.test.ts | 41 --------------- .brightsec/tests/post-api-feedbacks.test.ts | 41 --------------- .../tests/post-api-privacy-requests-1.test.ts | 40 -------------- .../tests/post-api-privacy-requests.test.ts | 40 -------------- .brightsec/tests/post-api-quantitys-1.test.ts | 41 --------------- .brightsec/tests/post-api-quantitys.test.ts | 41 --------------- .brightsec/tests/post-api-recycles.test.ts | 43 --------------- .../tests/post-api-security-answers-1.test.ts | 41 --------------- .../tests/post-api-security-answers.test.ts | 41 --------------- .../post-api-security-questions-1.test.ts | 41 --------------- .brightsec/tests/post-api-users.test.ts | 41 --------------- .brightsec/tests/post-b2b-v2-orders.test.ts | 40 -------------- .brightsec/tests/post-dataerasure.test.ts | 40 -------------- .brightsec/tests/post-file-upload.test.ts | 40 -------------- .../tests/post-profile-image-file.test.ts | 37 ------------- .../tests/post-profile-image-url.test.ts | 39 -------------- .brightsec/tests/post-profile.test.ts | 39 -------------- .../tests/post-rest-2fa-disable.test.ts | 39 -------------- .brightsec/tests/post-rest-2fa-setup.test.ts | 41 --------------- .brightsec/tests/post-rest-2fa-verify.test.ts | 40 -------------- .../tests/post-rest-basket-1-checkout.test.ts | 44 ---------------- .../tests/post-rest-chatbot-respond.test.ts | 43 --------------- .../tests/post-rest-deluxe-membership.test.ts | 41 --------------- .brightsec/tests/post-rest-memories.test.ts | 40 -------------- .../tests/post-rest-user-data-export.test.ts | 42 --------------- .brightsec/tests/post-rest-user-login.test.ts | 40 -------------- .../post-rest-user-reset-password.test.ts | 42 --------------- .../tests/post-rest-web3-submit-key.test.ts | 39 -------------- ...t-rest-web3-wallet-exploit-address.test.ts | 39 -------------- .../post-rest-web3-wallet-nft-verify.test.ts | 39 -------------- .brightsec/tests/post-snippets-fixes.test.ts | 40 -------------- .../tests/post-snippets-verdict.test.ts | 40 -------------- .brightsec/tests/put-api-addresses-1.test.ts | 45 ---------------- .brightsec/tests/put-api-addresss-1.test.ts | 45 ---------------- .../tests/put-api-basketitems-1.test.ts | 41 --------------- .brightsec/tests/put-api-cards-1.test.ts | 43 --------------- .brightsec/tests/put-api-challenges-1.test.ts | 52 ------------------- .brightsec/tests/put-api-complaints-1.test.ts | 40 -------------- .brightsec/tests/put-api-feedbacks-1.test.ts | 35 ------------- .../tests/put-api-privacyrequests-1.test.ts | 40 -------------- .brightsec/tests/put-api-quantitys-1.test.ts | 41 --------------- .brightsec/tests/put-api-recycles-1.test.ts | 43 --------------- .../tests/put-api-security-answers-1.test.ts | 39 -------------- .../put-api-security-questions-1.test.ts | 35 ------------- .brightsec/tests/put-api-users-1.test.ts | 42 --------------- ...-rest-basket-1-coupon-valid-coupon.test.ts | 36 ------------- ...ntinue-code-apply-example-code-123.test.ts | 39 -------------- ...-continue-code-findit-apply-abc123.test.ts | 39 -------------- ...t-continue-code-fixit-apply-abc123.test.ts | 35 ------------- ...t-order-history-id-delivery-status.test.ts | 42 --------------- .../put-rest-products-id-reviews.test.ts | 40 -------------- .../tests/put-rest-wallet-balance.test.ts | 41 --------------- 145 files changed, 5422 deletions(-) delete mode 100644 .brightsec/tests/delete-api-addresss-1.test.ts delete mode 100644 .brightsec/tests/delete-api-basketitems-1.test.ts delete mode 100644 .brightsec/tests/delete-api-cards-1.test.ts delete mode 100644 .brightsec/tests/delete-api-challenges-1.test.ts delete mode 100644 .brightsec/tests/delete-api-complaints-1.test.ts delete mode 100644 .brightsec/tests/delete-api-privacy-requests-1.test.ts delete mode 100644 .brightsec/tests/delete-api-products-1.test.ts delete mode 100644 .brightsec/tests/delete-api-quantitys-123.test.ts delete mode 100644 .brightsec/tests/delete-api-recycles-1.test.ts delete mode 100644 .brightsec/tests/delete-api-security-questions-1.test.ts delete mode 100644 .brightsec/tests/delete-api-securityanswers-1.test.ts delete mode 100644 .brightsec/tests/delete-api-users-123.test.ts delete mode 100644 .brightsec/tests/get-api-addresss-1.test.ts delete mode 100644 .brightsec/tests/get-api-addresss.test.ts delete mode 100644 .brightsec/tests/get-api-basket-items-1.test.ts delete mode 100644 .brightsec/tests/get-api-basket-items.test.ts delete mode 100644 .brightsec/tests/get-api-cards-1.test.ts delete mode 100644 .brightsec/tests/get-api-cards.test.ts delete mode 100644 .brightsec/tests/get-api-challenges-1.test.ts delete mode 100644 .brightsec/tests/get-api-challenges.test.ts delete mode 100644 .brightsec/tests/get-api-complaints-1.test.ts delete mode 100644 .brightsec/tests/get-api-complaints.test.ts delete mode 100644 .brightsec/tests/get-api-deliverys-1.test.ts delete mode 100644 .brightsec/tests/get-api-deliverys.test.ts delete mode 100644 .brightsec/tests/get-api-docs.test.ts delete mode 100644 .brightsec/tests/get-api-feedbacks-1.test.ts delete mode 100644 .brightsec/tests/get-api-feedbacks.test.ts delete mode 100644 .brightsec/tests/get-api-privacy-requests.test.ts delete mode 100644 .brightsec/tests/get-api-products-1.test.ts delete mode 100644 .brightsec/tests/get-api-products.test.ts delete mode 100644 .brightsec/tests/get-api-quantitys-123.test.ts delete mode 100644 .brightsec/tests/get-api-quantitys.test.ts delete mode 100644 .brightsec/tests/get-api-recycles-1.test.ts delete mode 100644 .brightsec/tests/get-api-security-answers-1.test.ts delete mode 100644 .brightsec/tests/get-api-security-answers.test.ts delete mode 100644 .brightsec/tests/get-api-security-questions.test.ts delete mode 100644 .brightsec/tests/get-api-users-123.test.ts delete mode 100644 .brightsec/tests/get-api-users.test.ts delete mode 100644 .brightsec/tests/get-assets-i18n.test.ts delete mode 100644 .brightsec/tests/get-assets-public-images-padding.test.ts delete mode 100644 .brightsec/tests/get-assets-public-images-products.test.ts delete mode 100644 .brightsec/tests/get-assets-public-images-uploads.test.ts delete mode 100644 .brightsec/tests/get-dataerasure.test.ts delete mode 100644 .brightsec/tests/get-encryptionkeys-samplefile-key.test.ts delete mode 100644 .brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts delete mode 100644 .brightsec/tests/get-ftp-sample-file-md.test.ts delete mode 100644 .brightsec/tests/get-ftp-sample-md.test.ts delete mode 100644 .brightsec/tests/get-metrics.test.ts delete mode 100644 .brightsec/tests/get-profile.test.ts delete mode 100644 .brightsec/tests/get-promotion.test.ts delete mode 100644 .brightsec/tests/get-redirect-to-url.test.ts delete mode 100644 .brightsec/tests/get-rest-2fa-status.test.ts delete mode 100644 .brightsec/tests/get-rest-admin-application-configuration.test.ts delete mode 100644 .brightsec/tests/get-rest-admin-application-version.test.ts delete mode 100644 .brightsec/tests/get-rest-basket-1-order.test.ts delete mode 100644 .brightsec/tests/get-rest-basket-1.test.ts delete mode 100644 .brightsec/tests/get-rest-captcha.test.ts delete mode 100644 .brightsec/tests/get-rest-continue-code-findit.test.ts delete mode 100644 .brightsec/tests/get-rest-continue-code-fixit.test.ts delete mode 100644 .brightsec/tests/get-rest-continue-code.test.ts delete mode 100644 .brightsec/tests/get-rest-country-mapping.test.ts delete mode 100644 .brightsec/tests/get-rest-deluxe-membership.test.ts delete mode 100644 .brightsec/tests/get-rest-image-captcha.test.ts delete mode 100644 .brightsec/tests/get-rest-languages.test.ts delete mode 100644 .brightsec/tests/get-rest-memories.test.ts delete mode 100644 .brightsec/tests/get-rest-order-history-orders.test.ts delete mode 100644 .brightsec/tests/get-rest-order-history.test.ts delete mode 100644 .brightsec/tests/get-rest-products-1-reviews.test.ts delete mode 100644 .brightsec/tests/get-rest-repeat-notification.test.ts delete mode 100644 .brightsec/tests/get-rest-save-login-ip.test.ts delete mode 100644 .brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts delete mode 100644 .brightsec/tests/get-rest-track-order-12345.test.ts delete mode 100644 .brightsec/tests/get-rest-user-change-password.test.ts delete mode 100644 .brightsec/tests/get-rest-user-security-question.test.ts delete mode 100644 .brightsec/tests/get-rest-user-whoami.test.ts delete mode 100644 .brightsec/tests/get-rest-wallet-balance.test.ts delete mode 100644 .brightsec/tests/get-rest-web3-nft-mint-listen.test.ts delete mode 100644 .brightsec/tests/get-rest-web3-nft-unlocked.test.ts delete mode 100644 .brightsec/tests/get-security-txt.test.ts delete mode 100644 .brightsec/tests/get-snippets-sample-challenge.test.ts delete mode 100644 .brightsec/tests/get-solve-challenges-server-side.test.ts delete mode 100644 .brightsec/tests/get-support-logs-file.test.ts delete mode 100644 .brightsec/tests/get-support-logs-sample-log.test.ts delete mode 100644 .brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts delete mode 100644 .brightsec/tests/get-video.test.ts delete mode 100644 .brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts delete mode 100644 .brightsec/tests/get-well-known-samplefile.test.ts delete mode 100644 .brightsec/tests/get-well-known-security-txt.test.ts delete mode 100644 .brightsec/tests/get-well-known.test.ts delete mode 100644 .brightsec/tests/patch-rest-products-reviews.test.ts delete mode 100644 .brightsec/tests/post-api-basket-items.test.ts delete mode 100644 .brightsec/tests/post-api-cards.test.ts delete mode 100644 .brightsec/tests/post-api-challenges.test.ts delete mode 100644 .brightsec/tests/post-api-complaints-1.test.ts delete mode 100644 .brightsec/tests/post-api-feedbacks.test.ts delete mode 100644 .brightsec/tests/post-api-privacy-requests-1.test.ts delete mode 100644 .brightsec/tests/post-api-privacy-requests.test.ts delete mode 100644 .brightsec/tests/post-api-quantitys-1.test.ts delete mode 100644 .brightsec/tests/post-api-quantitys.test.ts delete mode 100644 .brightsec/tests/post-api-recycles.test.ts delete mode 100644 .brightsec/tests/post-api-security-answers-1.test.ts delete mode 100644 .brightsec/tests/post-api-security-answers.test.ts delete mode 100644 .brightsec/tests/post-api-security-questions-1.test.ts delete mode 100644 .brightsec/tests/post-api-users.test.ts delete mode 100644 .brightsec/tests/post-b2b-v2-orders.test.ts delete mode 100644 .brightsec/tests/post-dataerasure.test.ts delete mode 100644 .brightsec/tests/post-file-upload.test.ts delete mode 100644 .brightsec/tests/post-profile-image-file.test.ts delete mode 100644 .brightsec/tests/post-profile-image-url.test.ts delete mode 100644 .brightsec/tests/post-profile.test.ts delete mode 100644 .brightsec/tests/post-rest-2fa-disable.test.ts delete mode 100644 .brightsec/tests/post-rest-2fa-setup.test.ts delete mode 100644 .brightsec/tests/post-rest-2fa-verify.test.ts delete mode 100644 .brightsec/tests/post-rest-basket-1-checkout.test.ts delete mode 100644 .brightsec/tests/post-rest-chatbot-respond.test.ts delete mode 100644 .brightsec/tests/post-rest-deluxe-membership.test.ts delete mode 100644 .brightsec/tests/post-rest-memories.test.ts delete mode 100644 .brightsec/tests/post-rest-user-data-export.test.ts delete mode 100644 .brightsec/tests/post-rest-user-login.test.ts delete mode 100644 .brightsec/tests/post-rest-user-reset-password.test.ts delete mode 100644 .brightsec/tests/post-rest-web3-submit-key.test.ts delete mode 100644 .brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts delete mode 100644 .brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts delete mode 100644 .brightsec/tests/post-snippets-fixes.test.ts delete mode 100644 .brightsec/tests/post-snippets-verdict.test.ts delete mode 100644 .brightsec/tests/put-api-addresses-1.test.ts delete mode 100644 .brightsec/tests/put-api-addresss-1.test.ts delete mode 100644 .brightsec/tests/put-api-basketitems-1.test.ts delete mode 100644 .brightsec/tests/put-api-cards-1.test.ts delete mode 100644 .brightsec/tests/put-api-challenges-1.test.ts delete mode 100644 .brightsec/tests/put-api-complaints-1.test.ts delete mode 100644 .brightsec/tests/put-api-feedbacks-1.test.ts delete mode 100644 .brightsec/tests/put-api-privacyrequests-1.test.ts delete mode 100644 .brightsec/tests/put-api-quantitys-1.test.ts delete mode 100644 .brightsec/tests/put-api-recycles-1.test.ts delete mode 100644 .brightsec/tests/put-api-security-answers-1.test.ts delete mode 100644 .brightsec/tests/put-api-security-questions-1.test.ts delete mode 100644 .brightsec/tests/put-api-users-1.test.ts delete mode 100644 .brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts delete mode 100644 .brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts delete mode 100644 .brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts delete mode 100644 .brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts delete mode 100644 .brightsec/tests/put-rest-order-history-id-delivery-status.test.ts delete mode 100644 .brightsec/tests/put-rest-products-id-reviews.test.ts delete mode 100644 .brightsec/tests/put-rest-wallet-balance.test.ts diff --git a/.brightsec/tests/delete-api-addresss-1.test.ts b/.brightsec/tests/delete-api-addresss-1.test.ts deleted file mode 100644 index b7830e0a..00000000 --- a/.brightsec/tests/delete-api-addresss-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Addresss/1`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/delete-api-basketitems-1.test.ts b/.brightsec/tests/delete-api-basketitems-1.test.ts deleted file mode 100644 index 1c99d16e..00000000 --- a/.brightsec/tests/delete-api-basketitems-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/BasketItems/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/BasketItems/1`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-cards-1.test.ts b/.brightsec/tests/delete-api-cards-1.test.ts deleted file mode 100644 index 8a1a4781..00000000 --- a/.brightsec/tests/delete-api-cards-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/cards/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-challenges-1.test.ts b/.brightsec/tests/delete-api-challenges-1.test.ts deleted file mode 100644 index 135fb06f..00000000 --- a/.brightsec/tests/delete-api-challenges-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/Challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Challenges/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-complaints-1.test.ts b/.brightsec/tests/delete-api-complaints-1.test.ts deleted file mode 100644 index f4eb425f..00000000 --- a/.brightsec/tests/delete-api-complaints-1.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'jwt', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Complaints/1`, - headers: { - 'Authorization': 'Bearer ', - 'Content-Type': 'application/json' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-privacy-requests-1.test.ts b/.brightsec/tests/delete-api-privacy-requests-1.test.ts deleted file mode 100644 index e62d3666..00000000 --- a/.brightsec/tests/delete-api-privacy-requests-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/privacy-requests/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/PrivacyRequests/1`, - headers: { 'X-Recruiting': 'Your Company Name' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-products-1.test.ts b/.brightsec/tests/delete-api-products-1.test.ts deleted file mode 100644 index 5be40331..00000000 --- a/.brightsec/tests/delete-api-products-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/products/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'http_method_fuzzing'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Products/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-quantitys-123.test.ts b/.brightsec/tests/delete-api-quantitys-123.test.ts deleted file mode 100644 index 183af4ad..00000000 --- a/.brightsec/tests/delete-api-quantitys-123.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/Quantitys/123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'http_method_fuzzing', 'osi'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Quantitys/123`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-recycles-1.test.ts b/.brightsec/tests/delete-api-recycles-1.test.ts deleted file mode 100644 index 53fd9a6c..00000000 --- a/.brightsec/tests/delete-api-recycles-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'id_enumeration', 'csrf', 'bopla'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Recycles/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-security-questions-1.test.ts b/.brightsec/tests/delete-api-security-questions-1.test.ts deleted file mode 100644 index de2a3579..00000000 --- a/.brightsec/tests/delete-api-security-questions-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/SecurityQuestions/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/delete-api-securityanswers-1.test.ts b/.brightsec/tests/delete-api-securityanswers-1.test.ts deleted file mode 100644 index d28b43f0..00000000 --- a/.brightsec/tests/delete-api-securityanswers-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/SecurityAnswers/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/SecurityAnswers/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/delete-api-users-123.test.ts b/.brightsec/tests/delete-api-users-123.test.ts deleted file mode 100644 index eb84ecec..00000000 --- a/.brightsec/tests/delete-api-users-123.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('DELETE /api/users/123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.DELETE, - url: `${baseUrl}/api/Users/123`, - headers: { 'X-Recruiting': 'We are hiring!' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-addresss-1.test.ts b/.brightsec/tests/get-api-addresss-1.test.ts deleted file mode 100644 index 8087a2e4..00000000 --- a/.brightsec/tests/get-api-addresss-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'sqli', 'csrf'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Addresss/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-addresss.test.ts b/.brightsec/tests/get-api-addresss.test.ts deleted file mode 100644 index a485b3eb..00000000 --- a/.brightsec/tests/get-api-addresss.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/addresss', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Addresss`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-basket-items-1.test.ts b/.brightsec/tests/get-api-basket-items-1.test.ts deleted file mode 100644 index cafd07b6..00000000 --- a/.brightsec/tests/get-api-basket-items-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/basket-items/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'sqli', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/BasketItems/1`, - headers: { 'X-Recruiting': 'We are hiring! Visit https://owasp.org/www-project-juice-shop/' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-basket-items.test.ts b/.brightsec/tests/get-api-basket-items.test.ts deleted file mode 100644 index 8c75be4a..00000000 --- a/.brightsec/tests/get-api-basket-items.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/basket-items', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/BasketItems`, - headers: { 'X-Recruiting': 'We are hiring!' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-cards-1.test.ts b/.brightsec/tests/get-api-cards-1.test.ts deleted file mode 100644 index a8caa675..00000000 --- a/.brightsec/tests/get-api-cards-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'sqli', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Cards/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-cards.test.ts b/.brightsec/tests/get-api-cards.test.ts deleted file mode 100644 index 850cb3d8..00000000 --- a/.brightsec/tests/get-api-cards.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/cards', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/cards`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-challenges-1.test.ts b/.brightsec/tests/get-api-challenges-1.test.ts deleted file mode 100644 index 16f6d034..00000000 --- a/.brightsec/tests/get-api-challenges-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Challenges/1`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-challenges.test.ts b/.brightsec/tests/get-api-challenges.test.ts deleted file mode 100644 index 71398399..00000000 --- a/.brightsec/tests/get-api-challenges.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/challenges', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'xss', 'business_constraint_bypass'], - attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Challenges`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-complaints-1.test.ts b/.brightsec/tests/get-api-complaints-1.test.ts deleted file mode 100644 index dfad93f8..00000000 --- a/.brightsec/tests/get-api-complaints-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['id_enumeration', 'bopla', 'csrf', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Complaints/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-complaints.test.ts b/.brightsec/tests/get-api-complaints.test.ts deleted file mode 100644 index 4a5ae33a..00000000 --- a/.brightsec/tests/get-api-complaints.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/complaints', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Complaints`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-deliverys-1.test.ts b/.brightsec/tests/get-api-deliverys-1.test.ts deleted file mode 100644 index 6e919157..00000000 --- a/.brightsec/tests/get-api-deliverys-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/deliverys/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['id_enumeration', 'bopla', 'improper_asset_management', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Deliverys/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-deliverys.test.ts b/.brightsec/tests/get-api-deliverys.test.ts deleted file mode 100644 index 2321b945..00000000 --- a/.brightsec/tests/get-api-deliverys.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/deliverys', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'improper_asset_management', 'xss', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Deliverys`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-docs.test.ts b/.brightsec/tests/get-api-docs.test.ts deleted file mode 100644 index e8a7bdc5..00000000 --- a/.brightsec/tests/get-api-docs.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api-docs', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'csrf', 'improper_asset_management', 'full_path_disclosure', 'open_database'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api-docs`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-feedbacks-1.test.ts b/.brightsec/tests/get-api-feedbacks-1.test.ts deleted file mode 100644 index d0ae8977..00000000 --- a/.brightsec/tests/get-api-feedbacks-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/feedbacks/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'xss', 'sqli', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Feedbacks/1`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-feedbacks.test.ts b/.brightsec/tests/get-api-feedbacks.test.ts deleted file mode 100644 index a10231ab..00000000 --- a/.brightsec/tests/get-api-feedbacks.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/feedbacks', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'xss', 'sqli'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Feedbacks`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-privacy-requests.test.ts b/.brightsec/tests/get-api-privacy-requests.test.ts deleted file mode 100644 index ffbe5739..00000000 --- a/.brightsec/tests/get-api-privacy-requests.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/privacy-requests', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'improper_asset_management', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/PrivacyRequests`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-products-1.test.ts b/.brightsec/tests/get-api-products-1.test.ts deleted file mode 100644 index 600b75e1..00000000 --- a/.brightsec/tests/get-api-products-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/products/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'id_enumeration', 'xss', 'csrf', 'business_constraint_bypass'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Products/1`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-products.test.ts b/.brightsec/tests/get-api-products.test.ts deleted file mode 100644 index 02fe0462..00000000 --- a/.brightsec/tests/get-api-products.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/products', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Products`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-quantitys-123.test.ts b/.brightsec/tests/get-api-quantitys-123.test.ts deleted file mode 100644 index 577a0517..00000000 --- a/.brightsec/tests/get-api-quantitys-123.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/Quantitys/123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['id_enumeration', 'bopla', 'csrf', 'sqli', 'xss', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Quantitys/123`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-quantitys.test.ts b/.brightsec/tests/get-api-quantitys.test.ts deleted file mode 100644 index a28c43d3..00000000 --- a/.brightsec/tests/get-api-quantitys.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/Quantitys', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Quantitys`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-recycles-1.test.ts b/.brightsec/tests/get-api-recycles-1.test.ts deleted file mode 100644 index 20c77b10..00000000 --- a/.brightsec/tests/get-api-recycles-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'id_enumeration', 'csrf', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Recycles/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-security-answers-1.test.ts b/.brightsec/tests/get-api-security-answers-1.test.ts deleted file mode 100644 index 89408f0e..00000000 --- a/.brightsec/tests/get-api-security-answers-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/SecurityAnswers/1?email=user@example.com`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-security-answers.test.ts b/.brightsec/tests/get-api-security-answers.test.ts deleted file mode 100644 index e24b3693..00000000 --- a/.brightsec/tests/get-api-security-answers.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/security-answers', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/SecurityAnswers?email=user@example.com`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-api-security-questions.test.ts b/.brightsec/tests/get-api-security-questions.test.ts deleted file mode 100644 index 0ec3cae8..00000000 --- a/.brightsec/tests/get-api-security-questions.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/security-questions', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'xss', 'sqli', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/SecurityQuestions?email=user@example.com`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-users-123.test.ts b/.brightsec/tests/get-api-users-123.test.ts deleted file mode 100644 index 3081ea3a..00000000 --- a/.brightsec/tests/get-api-users-123.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/users/123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['id_enumeration', 'bopla', 'xss', 'csrf', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Users/123?callback=callbackFunction`, - headers: { 'X-Recruiting': 'We are hiring! Check out our careers page.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-api-users.test.ts b/.brightsec/tests/get-api-users.test.ts deleted file mode 100644 index f102a3bb..00000000 --- a/.brightsec/tests/get-api-users.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /api/users', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/api/Users`, - headers: { 'X-Recruiting': 'undefined' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-assets-i18n.test.ts b/.brightsec/tests/get-assets-i18n.test.ts deleted file mode 100644 index 37bebb76..00000000 --- a/.brightsec/tests/get-assets-i18n.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /assets/i18n', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'improper_asset_management', 'lfi'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/assets/i18n`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-assets-public-images-padding.test.ts b/.brightsec/tests/get-assets-public-images-padding.test.ts deleted file mode 100644 index e69c9578..00000000 --- a/.brightsec/tests/get-assets-public-images-padding.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /assets/public/images/padding', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'lfi', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/assets/public/images/padding`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-assets-public-images-products.test.ts b/.brightsec/tests/get-assets-public-images-products.test.ts deleted file mode 100644 index e73f39af..00000000 --- a/.brightsec/tests/get-assets-public-images-products.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /assets/public/images/products', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'lfi', 'improper_asset_management', 'open_cloud_storage'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/assets/public/images/products`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-assets-public-images-uploads.test.ts b/.brightsec/tests/get-assets-public-images-uploads.test.ts deleted file mode 100644 index ee2e8226..00000000 --- a/.brightsec/tests/get-assets-public-images-uploads.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /assets/public/images/uploads', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['file_upload', 'lfi', 'xss', 'csrf', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/assets/public/images/uploads`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-dataerasure.test.ts b/.brightsec/tests/get-dataerasure.test.ts deleted file mode 100644 index 8187820a..00000000 --- a/.brightsec/tests/get-dataerasure.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /dataerasure', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'lfi', 'xss', 'bopla', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/dataerasure`, - headers: { 'X-Recruiting': 'undefined' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts b/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts deleted file mode 100644 index a5e0e3d4..00000000 --- a/.brightsec/tests/get-encryptionkeys-samplefile-key.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /encryptionkeys/samplefile.key', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'full_path_disclosure', 'id_enumeration', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/encryptionkeys/samplefile.key`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts b/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts deleted file mode 100644 index 7eecb113..00000000 --- a/.brightsec/tests/get-encryptionkeys-samplekeyfile.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /encryptionkeys/sampleKeyFile', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'open_cloud_storage', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/encryptionkeys/sampleKeyFile`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-ftp-sample-file-md.test.ts b/.brightsec/tests/get-ftp-sample-file-md.test.ts deleted file mode 100644 index be65570d..00000000 --- a/.brightsec/tests/get-ftp-sample-file-md.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /ftp/sample-file.md', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'ssrf', 'full_path_disclosure', 'unvalidated_redirect', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/ftp/sample-file.md`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-ftp-sample-md.test.ts b/.brightsec/tests/get-ftp-sample-md.test.ts deleted file mode 100644 index 2a4ba50f..00000000 --- a/.brightsec/tests/get-ftp-sample-md.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /ftp/sample.md', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'directoryListingChallenge', 'accessLogDisclosureChallenge', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/ftp/sample.md`, - headers: { 'X-Recruiting': 'undefined' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-metrics.test.ts b/.brightsec/tests/get-metrics.test.ts deleted file mode 100644 index ee866adf..00000000 --- a/.brightsec/tests/get-metrics.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /metrics', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['improper_asset_management', 'csrf', 'xss', 'open_database', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/metrics`, - headers: { 'Content-Type': 'text/plain; version=0.0.4; charset=utf-8' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-profile.test.ts b/.brightsec/tests/get-profile.test.ts deleted file mode 100644 index cadc4fc3..00000000 --- a/.brightsec/tests/get-profile.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /profile', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'bopla', 'id_enumeration', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/profile`, - headers: { - 'Content-Security-Policy': "img-src 'self' ; script-src 'self' 'unsafe-eval' https://code.getmdl.io http://ajax.googleapis.com" - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-promotion.test.ts b/.brightsec/tests/get-promotion.test.ts deleted file mode 100644 index 4e859127..00000000 --- a/.brightsec/tests/get-promotion.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /promotion', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'csrf', 'full_path_disclosure', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/promotion`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-redirect-to-url.test.ts b/.brightsec/tests/get-redirect-to-url.test.ts deleted file mode 100644 index 5aba3f94..00000000 --- a/.brightsec/tests/get-redirect-to-url.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /redirect?to=:url', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['unvalidated_redirect', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/redirect?to=https://example.com`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-2fa-status.test.ts b/.brightsec/tests/get-rest-2fa-status.test.ts deleted file mode 100644 index b3dd6520..00000000 --- a/.brightsec/tests/get-rest-2fa-status.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/2fa/status', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'secret_tokens', 'xss'], - attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/2fa/status`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-admin-application-configuration.test.ts b/.brightsec/tests/get-rest-admin-application-configuration.test.ts deleted file mode 100644 index 20017713..00000000 --- a/.brightsec/tests/get-rest-admin-application-configuration.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/admin/application-configuration', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['improper_asset_management', 'secret_tokens', 'open_database', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/admin/application-configuration`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-admin-application-version.test.ts b/.brightsec/tests/get-rest-admin-application-version.test.ts deleted file mode 100644 index 414691cc..00000000 --- a/.brightsec/tests/get-rest-admin-application-version.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/admin/application-version', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'improper_asset_management', 'full_path_disclosure', 'xss', 'open_database'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/admin/application-version`, - headers: { 'X-Recruiting': 'true' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-basket-1-order.test.ts b/.brightsec/tests/get-rest-basket-1-order.test.ts deleted file mode 100644 index ee9a4323..00000000 --- a/.brightsec/tests/get-rest-basket-1-order.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/basket/1/order', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'bopla', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/basket/1/order`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-basket-1.test.ts b/.brightsec/tests/get-rest-basket-1.test.ts deleted file mode 100644 index f4244bb8..00000000 --- a/.brightsec/tests/get-rest-basket-1.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/basket/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/basket/1`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-captcha.test.ts b/.brightsec/tests/get-rest-captcha.test.ts deleted file mode 100644 index 2914a3e7..00000000 --- a/.brightsec/tests/get-rest-captcha.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/captcha', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['osi', 'csrf', 'business_constraint_bypass', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/captcha`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-continue-code-findit.test.ts b/.brightsec/tests/get-rest-continue-code-findit.test.ts deleted file mode 100644 index b0ba5e47..00000000 --- a/.brightsec/tests/get-rest-continue-code-findit.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/continue-code-findIt', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['business_constraint_bypass', 'id_enumeration', 'open_database', 'sqli', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/continue-code-findIt`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-continue-code-fixit.test.ts b/.brightsec/tests/get-rest-continue-code-fixit.test.ts deleted file mode 100644 index 805399d5..00000000 --- a/.brightsec/tests/get-rest-continue-code-fixit.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/continue-code-fixIt', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'csrf', 'xss', 'insecure_tls_configuration', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/continue-code-fixIt`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-continue-code.test.ts b/.brightsec/tests/get-rest-continue-code.test.ts deleted file mode 100644 index 73cd33c7..00000000 --- a/.brightsec/tests/get-rest-continue-code.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/continue-code', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'id_enumeration', 'sqli', 'ssrf'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/continue-code`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-country-mapping.test.ts b/.brightsec/tests/get-rest-country-mapping.test.ts deleted file mode 100644 index 1ad2b098..00000000 --- a/.brightsec/tests/get-rest-country-mapping.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/country-mapping', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['improper_asset_management', 'full_path_disclosure', 'csrf', 'open_database'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/country-mapping`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-deluxe-membership.test.ts b/.brightsec/tests/get-rest-deluxe-membership.test.ts deleted file mode 100644 index 0c510d8c..00000000 --- a/.brightsec/tests/get-rest-deluxe-membership.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/deluxe-membership', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'business_constraint_bypass', 'xss', 'jwt'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/deluxe-membership`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-image-captcha.test.ts b/.brightsec/tests/get-rest-image-captcha.test.ts deleted file mode 100644 index 1121742c..00000000 --- a/.brightsec/tests/get-rest-image-captcha.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/image-captcha', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'id_enumeration', 'secret_tokens', 'sqli'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/image-captcha`, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/get-rest-languages.test.ts b/.brightsec/tests/get-rest-languages.test.ts deleted file mode 100644 index 4a5cc88c..00000000 --- a/.brightsec/tests/get-rest-languages.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/languages', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['full_path_disclosure', 'xss', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/languages`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-memories.test.ts b/.brightsec/tests/get-rest-memories.test.ts deleted file mode 100644 index 840d2f45..00000000 --- a/.brightsec/tests/get-rest-memories.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/memories', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'id_enumeration', 'xss', 'sqli', 'csrf'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/memories`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-order-history-orders.test.ts b/.brightsec/tests/get-rest-order-history-orders.test.ts deleted file mode 100644 index b1a57b91..00000000 --- a/.brightsec/tests/get-rest-order-history-orders.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/order-history/orders', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'nosql', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/order-history/orders`, - headers: { 'Authorization': 'Bearer ' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-order-history.test.ts b/.brightsec/tests/get-rest-order-history.test.ts deleted file mode 100644 index 3f8a0bc6..00000000 --- a/.brightsec/tests/get-rest-order-history.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/order-history', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'nosql', 'stored_xss', 'xss'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/order-history`, - headers: { - 'Authorization': 'Bearer ', - 'Content-Type': 'application/json' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-products-1-reviews.test.ts b/.brightsec/tests/get-rest-products-1-reviews.test.ts deleted file mode 100644 index 1a65a865..00000000 --- a/.brightsec/tests/get-rest-products-1-reviews.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/products/1/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['nosql', 'xss', 'csrf', 'id_enumeration', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/products/1/reviews`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-repeat-notification.test.ts b/.brightsec/tests/get-rest-repeat-notification.test.ts deleted file mode 100644 index 5b1a0dd5..00000000 --- a/.brightsec/tests/get-rest-repeat-notification.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/repeat-notification', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'csrf', 'business_constraint_bypass', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/repeat-notification?challenge=OWASP%20Top%2010`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-save-login-ip.test.ts b/.brightsec/tests/get-rest-save-login-ip.test.ts deleted file mode 100644 index c444a88d..00000000 --- a/.brightsec/tests/get-rest-save-login-ip.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/saveLoginIp', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'csrf', 'bopla', 'osi'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/saveLoginIp`, - headers: { 'true-client-ip': '192.168.1.1' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts b/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts deleted file mode 100644 index f7679f36..00000000 --- a/.brightsec/tests/get-rest-snippets-fixes-samplekey.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/snippets/fixes/sampleKey', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'full_path_disclosure', 'lfi', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/snippets/fixes/sampleKey`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-track-order-12345.test.ts b/.brightsec/tests/get-rest-track-order-12345.test.ts deleted file mode 100644 index ac7b429e..00000000 --- a/.brightsec/tests/get-rest-track-order-12345.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/track-order/:id', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['test/api/trackResultApiSpec.ts', 'test/cypress/e2e/trackOrder.spec.ts'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/track-order/12345`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-user-change-password.test.ts b/.brightsec/tests/get-rest-user-change-password.test.ts deleted file mode 100644 index 2d47914b..00000000 --- a/.brightsec/tests/get-rest-user-change-password.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/user/change-password', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'bopla', 'sqli', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/user/change-password?current=currentPassword123&new=newPassword123&repeat=newPassword123`, - headers: { 'X-Recruiting': 'undefined' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-user-security-question.test.ts b/.brightsec/tests/get-rest-user-security-question.test.ts deleted file mode 100644 index 56529ed2..00000000 --- a/.brightsec/tests/get-rest-user-security-question.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/user/security-question', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'id_enumeration', 'sqli', 'xss', 'email_injection'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/user/security-question?email=user@example.com`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-user-whoami.test.ts b/.brightsec/tests/get-rest-user-whoami.test.ts deleted file mode 100644 index 15deb0dc..00000000 --- a/.brightsec/tests/get-rest-user-whoami.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/user/whoami', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'bopla', 'id_enumeration', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/user/whoami?callback=callbackFunction`, - headers: { 'X-Recruiting': '/#/jobs' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-wallet-balance.test.ts b/.brightsec/tests/get-rest-wallet-balance.test.ts deleted file mode 100644 index 49171321..00000000 --- a/.brightsec/tests/get-rest-wallet-balance.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/wallet/balance', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'sqli', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.HEADER, AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/wallet/balance`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts b/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts deleted file mode 100644 index f378aca6..00000000 --- a/.brightsec/tests/get-rest-web3-nft-mint-listen.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/web3/nftMintListen', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['ssrf', 'secret_tokens', 'open_database', 'csrf', 'xss'], - attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/web3/nftMintListen`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts b/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts deleted file mode 100644 index fef9ca8e..00000000 --- a/.brightsec/tests/get-rest-web3-nft-unlocked.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /rest/web3/nftUnlocked', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/rest/web3/nftUnlocked`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-security-txt.test.ts b/.brightsec/tests/get-security-txt.test.ts deleted file mode 100644 index bb726b76..00000000 --- a/.brightsec/tests/get-security-txt.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /security.txt', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'xss'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/security.txt`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-snippets-sample-challenge.test.ts b/.brightsec/tests/get-snippets-sample-challenge.test.ts deleted file mode 100644 index 730715ad..00000000 --- a/.brightsec/tests/get-snippets-sample-challenge.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /snippets/sample-challenge', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'csrf', 'id_enumeration', 'improper_asset_management', 'full_path_disclosure'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/snippets/sample-challenge`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-solve-challenges-server-side.test.ts b/.brightsec/tests/get-solve-challenges-server-side.test.ts deleted file mode 100644 index 994c4584..00000000 --- a/.brightsec/tests/get-solve-challenges-server-side.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /solve/challenges/server-side', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['ssti', 'ssrf', 'xss', 'csrf', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.QUERY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/solve/challenges/server-side?key=tRy_H4rd3r_n0thIng_iS_Imp0ssibl3`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-support-logs-file.test.ts b/.brightsec/tests/get-support-logs-file.test.ts deleted file mode 100644 index 36838679..00000000 --- a/.brightsec/tests/get-support-logs-file.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /support/logs/:file', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'full_path_disclosure', 'access_control', 'http_method_fuzzing'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/support/logs/testfile`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-support-logs-sample-log.test.ts b/.brightsec/tests/get-support-logs-sample-log.test.ts deleted file mode 100644 index 9cca1afa..00000000 --- a/.brightsec/tests/get-support-logs-sample-log.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /support/logs/sample.log', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['lfi', 'ssrf', 'full_path_disclosure', 'improper_asset_management'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/support/logs/sample.log`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts b/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts deleted file mode 100644 index b9f288bc..00000000 --- a/.brightsec/tests/get-this-page-is-hidden-behind-an-incredibly-high-paywall-that-could-only-be-unlocked-by-sending-1btc-to-us.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /this/page/is/hidden/behind/an/incredibly/high/paywall/that/could/only/be/unlocked/by/sending/1btc/to/us', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'id_enumeration', 'improper_asset_management', 'unvalidated_redirect', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/this/page/is/hidden/behind/an/incredibly/high/paywall/that/could/only/be/unlocked/by/sending/1btc/to/us`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-video.test.ts b/.brightsec/tests/get-video.test.ts deleted file mode 100644 index 9ddfc7b8..00000000 --- a/.brightsec/tests/get-video.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /video', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'full_path_disclosure', 'ssrf', 'lfi'], - attackParamLocations: [AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/video`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts b/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts deleted file mode 100644 index 61c434d7..00000000 --- a/.brightsec/tests/get-we-may-also-instruct-you-to-refuse-all-reasonably-necessary-responsibility.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /we/may/also/instruct/you/to/refuse/all/reasonably/necessary/responsibility', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'full_path_disclosure', 'improper_asset_management', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/we/may/also/instruct/you/to/refuse/all/reasonably/necessary/responsibility`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-well-known-samplefile.test.ts b/.brightsec/tests/get-well-known-samplefile.test.ts deleted file mode 100644 index 90fa87c4..00000000 --- a/.brightsec/tests/get-well-known-samplefile.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /.well-known/samplefile', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['improper_asset_management', 'full_path_disclosure', 'lfi', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/.well-known/samplefile`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-well-known-security-txt.test.ts b/.brightsec/tests/get-well-known-security-txt.test.ts deleted file mode 100644 index 3288bec3..00000000 --- a/.brightsec/tests/get-well-known-security-txt.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /.well-known/security.txt', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'full_path_disclosure', 'improper_asset_management', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/.well-known/security.txt`, - headers: { 'X-Recruiting': '/#/jobs' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/get-well-known.test.ts b/.brightsec/tests/get-well-known.test.ts deleted file mode 100644 index bcf047eb..00000000 --- a/.brightsec/tests/get-well-known.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('GET /.well-known', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['improper_asset_management', 'full_path_disclosure', 'lfi', 'xss'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.GET, - url: `${baseUrl}/.well-known`, - headers: { 'X-Recruiting': '' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/patch-rest-products-reviews.test.ts b/.brightsec/tests/patch-rest-products-reviews.test.ts deleted file mode 100644 index 15448624..00000000 --- a/.brightsec/tests/patch-rest-products-reviews.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PATCH /rest/products/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'nosql', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PATCH, - url: `${baseUrl}/rest/products/reviews`, - body: { - id: '507f1f77bcf86cd799439011', - message: 'Updated review message.' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-basket-items.test.ts b/.brightsec/tests/post-api-basket-items.test.ts deleted file mode 100644 index e7d13b18..00000000 --- a/.brightsec/tests/post-api-basket-items.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/BasketItems', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/BasketItems`, - body: { - ProductId: 1, - BasketId: 1, - quantity: 2 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-cards.test.ts b/.brightsec/tests/post-api-cards.test.ts deleted file mode 100644 index da1ad64e..00000000 --- a/.brightsec/tests/post-api-cards.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/cards', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Cards`, - body: { - UserId: 1, - fullName: 'John Doe', - cardNum: '1234567812345678', - expMonth: 12, - expYear: 2025 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-challenges.test.ts b/.brightsec/tests/post-api-challenges.test.ts deleted file mode 100644 index 017fb9b7..00000000 --- a/.brightsec/tests/post-api-challenges.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/challenges', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'xss', 'sqli', 'osi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Challenges`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-complaints-1.test.ts b/.brightsec/tests/post-api-complaints-1.test.ts deleted file mode 100644 index b66e6762..00000000 --- a/.brightsec/tests/post-api-complaints-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'file_upload', 'xss', 'osi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Complaints/1`, - body: { - UserId: 123, - message: 'This is a sample complaint message.', - file: 'complaint_document.pdf' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-feedbacks.test.ts b/.brightsec/tests/post-api-feedbacks.test.ts deleted file mode 100644 index 33913cfd..00000000 --- a/.brightsec/tests/post-api-feedbacks.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/feedbacks', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'bopla', 'sqli', 'stored_xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Feedbacks`, - body: { - UserId: 123, - comment: 'Great service!', - rating: 5 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-privacy-requests-1.test.ts b/.brightsec/tests/post-api-privacy-requests-1.test.ts deleted file mode 100644 index 45acef19..00000000 --- a/.brightsec/tests/post-api-privacy-requests-1.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/privacy-requests/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/PrivacyRequests/1`, - body: { - email: 'user@example.com', - securityAnswer: 'correct_answer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-privacy-requests.test.ts b/.brightsec/tests/post-api-privacy-requests.test.ts deleted file mode 100644 index 26839953..00000000 --- a/.brightsec/tests/post-api-privacy-requests.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/privacy-requests', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'xss', 'sqli', 'email_injection', 'osi', 'nosql', 'xxe'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/PrivacyRequests`, - body: { - email: 'user@example.com', - securityAnswer: 'mySecurityAnswer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-quantitys-1.test.ts b/.brightsec/tests/post-api-quantitys-1.test.ts deleted file mode 100644 index 1641283c..00000000 --- a/.brightsec/tests/post-api-quantitys-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/quantitys/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'csrf', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Quantitys/1`, - body: { - ProductId: 1, - quantity: 100, - limitPerUser: 5 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-quantitys.test.ts b/.brightsec/tests/post-api-quantitys.test.ts deleted file mode 100644 index bd879e74..00000000 --- a/.brightsec/tests/post-api-quantitys.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/quantitys', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Quantitys`, - body: { - ProductId: 1, - quantity: 10, - limitPerUser: 5 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-recycles.test.ts b/.brightsec/tests/post-api-recycles.test.ts deleted file mode 100644 index 706ba0fd..00000000 --- a/.brightsec/tests/post-api-recycles.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/recycles', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'bopla', 'csrf', 'date_manipulation', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Recycles`, - body: { - UserId: 1, - AddressId: 1, - quantity: 10, - isPickup: true, - date: '2023-10-05T14:48:00.000Z' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-security-answers-1.test.ts b/.brightsec/tests/post-api-security-answers-1.test.ts deleted file mode 100644 index 30e4ba42..00000000 --- a/.brightsec/tests/post-api-security-answers-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'sqli', 'xss', 'csrf', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/SecurityAnswers/1`, - body: { - answer: 'hashed_answer_example', - UserId: 1, - SecurityQuestionId: 1 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-security-answers.test.ts b/.brightsec/tests/post-api-security-answers.test.ts deleted file mode 100644 index 53b8033f..00000000 --- a/.brightsec/tests/post-api-security-answers.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/security-answers', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'sqli', 'xss', 'csrf', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/SecurityAnswers`, - body: { - SecurityQuestionId: 1, - UserId: 123, - answer: 'hashed_answer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-api-security-questions-1.test.ts b/.brightsec/tests/post-api-security-questions-1.test.ts deleted file mode 100644 index 4be18a45..00000000 --- a/.brightsec/tests/post-api-security-questions-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/SecurityQuestions/1`, - body: { - SecurityQuestionId: 1, - UserId: 1, - answer: 'hashed_answer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-api-users.test.ts b/.brightsec/tests/post-api-users.test.ts deleted file mode 100644 index 27e08962..00000000 --- a/.brightsec/tests/post-api-users.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /api/users', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'sqli', 'csrf', 'bopla', 'proto_pollution', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/api/Users`, - body: { - email: 'user@example.com', - password: 'securePassword123', - passwordRepeat: 'securePassword123' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-b2b-v2-orders.test.ts b/.brightsec/tests/post-b2b-v2-orders.test.ts deleted file mode 100644 index 2fe1b339..00000000 --- a/.brightsec/tests/post-b2b-v2-orders.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /b2b/v2/orders', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['osi', 'ssrf', 'sqli', 'rfi', 'ssti', 'xss', 'csrf', 'business_constraint_bypass'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/b2b/v2/orders`, - body: { - cid: 'exampleCID', - orderLinesData: 'exampleOrderLinesData' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-dataerasure.test.ts b/.brightsec/tests/post-dataerasure.test.ts deleted file mode 100644 index 15d59604..00000000 --- a/.brightsec/tests/post-dataerasure.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /dataerasure', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'lfi', 'osi', 'xss', 'bopla'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/dataerasure`, - body: { - email: 'user@example.com', - securityAnswer: 'correct_answer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-file-upload.test.ts b/.brightsec/tests/post-file-upload.test.ts deleted file mode 100644 index 23d6dc92..00000000 --- a/.brightsec/tests/post-file-upload.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /file-upload', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['file_upload', 'ssrf', 'xxe', 'insecure_tls_configuration'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/file-upload`, - headers: { 'X-Recruiting': 'We are hiring! Visit our careers page for more information.' }, - body: { - mimeType: 'multipart/form-data', - text: '--boundary\r\nContent-Disposition: form-data; name="file"; filename="example.zip"\r\nContent-Type: application/zip\r\n\r\n\r\n--boundary--' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-profile-image-file.test.ts b/.brightsec/tests/post-profile-image-file.test.ts deleted file mode 100644 index 99624302..00000000 --- a/.brightsec/tests/post-profile-image-file.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /profile/image/file', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['file_upload', 'xss', 'csrf', 'ssrf', 'osi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/profile/image/file`, - headers: { 'Content-Type': 'multipart/form-data' }, - body: `--boundary\r\nContent-Disposition: form-data; name="file"; filename="profile.jpg"\r\nContent-Type: image/jpeg\r\n\r\n\r\n--boundary--`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-profile-image-url.test.ts b/.brightsec/tests/post-profile-image-url.test.ts deleted file mode 100644 index 1de2a957..00000000 --- a/.brightsec/tests/post-profile-image-url.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /profile/image/url', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['ssrf', 'file_upload', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/profile/image/url`, - body: { - imageUrl: 'http://example.com/image.jpg' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-profile.test.ts b/.brightsec/tests/post-profile.test.ts deleted file mode 100644 index becd855b..00000000 --- a/.brightsec/tests/post-profile.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /profile', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'xss', 'sqli', 'proto_pollution'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/profile`, - body: { - username: 'newUsername' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-2fa-disable.test.ts b/.brightsec/tests/post-rest-2fa-disable.test.ts deleted file mode 100644 index cf4e428e..00000000 --- a/.brightsec/tests/post-rest-2fa-disable.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/2fa/disable', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'osi', 'secret_tokens', 'jwt'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/2fa/disable`, - body: { - password: 'examplePassword123' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-2fa-setup.test.ts b/.brightsec/tests/post-rest-2fa-setup.test.ts deleted file mode 100644 index 3ae58371..00000000 --- a/.brightsec/tests/post-rest-2fa-setup.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/2fa/setup', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'jwt', 'secret_tokens', 'osi', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/2fa/setup`, - body: { - password: 'userPassword123', - setupToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZWNyZXQiOiJzZWNyZXRUb3RwU2VjcmV0IiwidHlwZSI6InRvdHBfc2V0dXBfc2VjcmV0In0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c', - initialToken: '123456' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-2fa-verify.test.ts b/.brightsec/tests/post-rest-2fa-verify.test.ts deleted file mode 100644 index d33a0fdf..00000000 --- a/.brightsec/tests/post-rest-2fa-verify.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/2fa/verify', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'jwt', 'secret_tokens', 'xss', 'bopla'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/2fa/verify`, - body: { - tmpToken: 'sampleTmpToken123', - totpToken: '123456' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-basket-1-checkout.test.ts b/.brightsec/tests/post-rest-basket-1-checkout.test.ts deleted file mode 100644 index c26e1fea..00000000 --- a/.brightsec/tests/post-rest-basket-1-checkout.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/basket/1/checkout', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'business_constraint_bypass', 'sqli', 'xss', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/basket/1/checkout`, - body: { - orderDetails: { - deliveryMethodId: 1, - paymentId: 'wallet', - addressId: 1 - }, - UserId: 1 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-chatbot-respond.test.ts b/.brightsec/tests/post-rest-chatbot-respond.test.ts deleted file mode 100644 index 2a417549..00000000 --- a/.brightsec/tests/post-rest-chatbot-respond.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/chatbot/respond', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['jwt', 'xss', 'nosql', 'csrf', 'osi'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/chatbot/respond`, - body: { - action: 'query', - query: 'Hello, how are you?' - }, - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer ' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-deluxe-membership.test.ts b/.brightsec/tests/post-rest-deluxe-membership.test.ts deleted file mode 100644 index 25e17e7f..00000000 --- a/.brightsec/tests/post-rest-deluxe-membership.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/deluxe-membership', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'business_constraint_bypass'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/deluxe-membership`, - body: { - UserId: 123, - paymentMode: 'wallet', - paymentId: 456 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-memories.test.ts b/.brightsec/tests/post-rest-memories.test.ts deleted file mode 100644 index 069b961f..00000000 --- a/.brightsec/tests/post-rest-memories.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/memories', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['file_upload', 'bopla', 'stored_xss', 'sqli'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/memories`, - body: { - caption: 'A beautiful sunset', - UserId: 1 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-user-data-export.test.ts b/.brightsec/tests/post-rest-user-data-export.test.ts deleted file mode 100644 index f88999e5..00000000 --- a/.brightsec/tests/post-rest-user-data-export.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/user/data-export', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'nosql', 'xss', 'csrf', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/user/data-export`, - body: { - UserId: '1' - }, - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer ' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-user-login.test.ts b/.brightsec/tests/post-rest-user-login.test.ts deleted file mode 100644 index 0ed1fa2f..00000000 --- a/.brightsec/tests/post-rest-user-login.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/user/login', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'csrf', 'xss', 'jwt', 'bopla'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/user/login`, - body: { - email: 'user@example.com', - password: 'securePassword123' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-rest-user-reset-password.test.ts b/.brightsec/tests/post-rest-user-reset-password.test.ts deleted file mode 100644 index 07a99ffe..00000000 --- a/.brightsec/tests/post-rest-user-reset-password.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/user/reset-password', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'email_injection', 'bopla', 'xss', 'sqli', 'osi', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/user/reset-password`, - body: { - email: 'user@example.com', - answer: 'correct_answer', - new: 'new_password', - repeat: 'new_password' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-web3-submit-key.test.ts b/.brightsec/tests/post-rest-web3-submit-key.test.ts deleted file mode 100644 index 532d8d99..00000000 --- a/.brightsec/tests/post-rest-web3-submit-key.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/web3/submitKey', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['osi', 'csrf', 'xss', 'secret_tokens', 'bopla'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/web3/submitKey`, - body: { - walletAddress: '0x1234567890abcdef1234567890abcdef12345678' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts b/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts deleted file mode 100644 index 1d01227f..00000000 --- a/.brightsec/tests/post-rest-web3-wallet-exploit-address.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/web3/walletExploitAddress', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['ssrf', 'osi', 'xss', 'csrf', 'jwt'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/web3/walletExploitAddress`, - body: { - walletAddress: '0x1234567890abcdef1234567890abcdef12345678' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts b/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts deleted file mode 100644 index bc4153c1..00000000 --- a/.brightsec/tests/post-rest-web3-wallet-nft-verify.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /rest/web3/walletNFTVerify', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'xss', 'nosql', 'osi', 'secret_tokens'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/rest/web3/walletNFTVerify`, - body: { - walletAddress: '0x1234567890abcdef1234567890abcdef12345678' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/post-snippets-fixes.test.ts b/.brightsec/tests/post-snippets-fixes.test.ts deleted file mode 100644 index 43cac909..00000000 --- a/.brightsec/tests/post-snippets-fixes.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /snippets/fixes', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'xss', 'sqli', 'lfi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/snippets/fixes`, - body: { - key: 'exampleKey', - selectedFix: 1 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/post-snippets-verdict.test.ts b/.brightsec/tests/post-snippets-verdict.test.ts deleted file mode 100644 index 4a70ac29..00000000 --- a/.brightsec/tests/post-snippets-verdict.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('POST /snippets/verdict', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['xss', 'sqli', 'csrf', 'bopla', 'osi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.POST, - url: `${baseUrl}/snippets/verdict`, - body: { - selectedLines: [1, 2, 3], - key: 'exampleKey' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-addresses-1.test.ts b/.brightsec/tests/put-api-addresses-1.test.ts deleted file mode 100644 index 417d12c3..00000000 --- a/.brightsec/tests/put-api-addresses-1.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/addresses/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Addresses/1`, - body: { - fullName: 'John Doe', - mobileNum: 1234567890, - zipCode: '12345', - streetAddress: '123 Main St', - city: 'Metropolis', - state: 'NY', - country: 'USA' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-addresss-1.test.ts b/.brightsec/tests/put-api-addresss-1.test.ts deleted file mode 100644 index 0c4e28d1..00000000 --- a/.brightsec/tests/put-api-addresss-1.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/addresss/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Addresss/1`, - body: { - fullName: 'John Doe', - mobileNum: 1234567890, - zipCode: '12345', - streetAddress: '123 Main St', - city: 'Anytown', - state: 'CA', - country: 'USA' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-basketitems-1.test.ts b/.brightsec/tests/put-api-basketitems-1.test.ts deleted file mode 100644 index a3180dab..00000000 --- a/.brightsec/tests/put-api-basketitems-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/BasketItems/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'business_constraint_bypass', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/BasketItems/1`, - body: { - ProductId: 1, - BasketId: 1, - quantity: 2 - }, - headers: { 'Content-Type': 'application/json', 'X-Recruiting': '[value from config]' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-cards-1.test.ts b/.brightsec/tests/put-api-cards-1.test.ts deleted file mode 100644 index ad467fb6..00000000 --- a/.brightsec/tests/put-api-cards-1.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/cards/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'date_manipulation', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Cards/1`, - body: { - UserId: 1, - fullName: 'John Doe', - cardNum: 1234567812345678, - expMonth: 12, - expYear: 2090 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-challenges-1.test.ts b/.brightsec/tests/put-api-challenges-1.test.ts deleted file mode 100644 index 648c2dbb..00000000 --- a/.brightsec/tests/put-api-challenges-1.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/challenges/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'xss', 'sqli', 'osi'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Challenges/1`, - body: { - name: "New Challenge Name", - category: "Category Example", - description: "This is a description of the challenge.", - difficulty: 3, - hint: "This is a hint.", - hintUrl: "http://example.com/hint", - mitigationUrl: "http://example.com/mitigation", - key: "restfulXssChallenge", - disabledEnv: "production", - tutorialOrder: 1, - tags: "tag1,tag2", - solved: false, - codingChallengeStatus: 0, - hasCodingChallenge: true - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-complaints-1.test.ts b/.brightsec/tests/put-api-complaints-1.test.ts deleted file mode 100644 index e1c19c3b..00000000 --- a/.brightsec/tests/put-api-complaints-1.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/Complaints/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'file_upload', 'sqli', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Complaints/1`, - body: { - message: 'This is a sample complaint message.', - file: 'complaint_document.pdf' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-feedbacks-1.test.ts b/.brightsec/tests/put-api-feedbacks-1.test.ts deleted file mode 100644 index d1d96257..00000000 --- a/.brightsec/tests/put-api-feedbacks-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/Feedbacks/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'xss', 'sqli'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Feedbacks/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-privacyrequests-1.test.ts b/.brightsec/tests/put-api-privacyrequests-1.test.ts deleted file mode 100644 index 7365610b..00000000 --- a/.brightsec/tests/put-api-privacyrequests-1.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/PrivacyRequests/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/PrivacyRequests/1`, - body: { - UserId: 123, - deletionRequested: true - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-quantitys-1.test.ts b/.brightsec/tests/put-api-quantitys-1.test.ts deleted file mode 100644 index 4873ed74..00000000 --- a/.brightsec/tests/put-api-quantitys-1.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/Quantitys/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Quantitys/1`, - body: { - ProductId: 123, - quantity: 10, - limitPerUser: 5 - }, - headers: { 'Content-Type': 'application/json', 'X-Recruiting': 'Your Company Name' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/put-api-recycles-1.test.ts b/.brightsec/tests/put-api-recycles-1.test.ts deleted file mode 100644 index 9a90add2..00000000 --- a/.brightsec/tests/put-api-recycles-1.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/recycles/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['sqli', 'bopla', 'csrf', 'id_enumeration', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Recycles/1`, - body: { - UserId: 1, - AddressId: 1, - quantity: 10, - isPickup: true, - date: "2023-10-01T00:00:00Z" - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-security-answers-1.test.ts b/.brightsec/tests/put-api-security-answers-1.test.ts deleted file mode 100644 index e96c320c..00000000 --- a/.brightsec/tests/put-api-security-answers-1.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/security-answers/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'sqli', 'xss', 'csrf'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/SecurityAnswers/1`, - body: { - answer: 'exampleAnswer' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-security-questions-1.test.ts b/.brightsec/tests/put-api-security-questions-1.test.ts deleted file mode 100644 index 064b558b..00000000 --- a/.brightsec/tests/put-api-security-questions-1.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/security-questions/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/SecurityQuestions/1`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-api-users-1.test.ts b/.brightsec/tests/put-api-users-1.test.ts deleted file mode 100644 index 9d8647ef..00000000 --- a/.brightsec/tests/put-api-users-1.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /api/users/1', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'id_enumeration', 'jwt', 'xss'], - attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/api/Users/1`, - body: { - username: 'newUsername' - }, - headers: { - 'Authorization': 'Bearer ', - 'Content-Type': 'application/json' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file diff --git a/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts b/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts deleted file mode 100644 index 1188b18e..00000000 --- a/.brightsec/tests/put-rest-basket-1-coupon-valid-coupon.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/basket/1/coupon/validCoupon', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'business_constraint_bypass'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/basket/1/coupon/validCoupon`, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts b/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts deleted file mode 100644 index f5fe321a..00000000 --- a/.brightsec/tests/put-rest-continue-code-apply-example-code-123.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/continue-code/apply/exampleCode123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'csrf', 'unvalidated_redirect'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/continue-code/apply/exampleCode123`, - body: { - continueCode: 'exampleCode123' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts b/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts deleted file mode 100644 index 81c44373..00000000 --- a/.brightsec/tests/put-rest-continue-code-findit-apply-abc123.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/continue-code-findIt/apply/abc123', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'proto_pollution', 'unvalidated_redirect', 'xss'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/continue-code-findIt/apply/abc123`, - body: { - continueCode: 'abc123' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts b/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts deleted file mode 100644 index 67d4d849..00000000 --- a/.brightsec/tests/put-rest-continue-code-fixit-apply-abc123.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/continue-code-fixIt/apply/:id', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'unvalidated_redirect', 'sqli', 'xss'], - attackParamLocations: [AttackParamLocation.PATH], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/continue-code-fixIt/apply/abc123`, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts b/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts deleted file mode 100644 index cd41232e..00000000 --- a/.brightsec/tests/put-rest-order-history-id-delivery-status.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/order-history/:id/delivery-status', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['csrf', 'bopla', 'id_enumeration', 'nosql'], - attackParamLocations: [AttackParamLocation.PATH, AttackParamLocation.BODY, AttackParamLocation.HEADER], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/order-history/123/delivery-status`, - body: { - deliveryStatus: true - }, - headers: { - 'Content-Type': 'application/json', - 'X-Recruiting': 'We are hiring!' - }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-products-id-reviews.test.ts b/.brightsec/tests/put-rest-products-id-reviews.test.ts deleted file mode 100644 index 0466c130..00000000 --- a/.brightsec/tests/put-rest-products-id-reviews.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/products/:id/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['nosql', 'stored_xss', 'csrf', 'bopla'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/products/507f1f77bcf86cd799439011/reviews`, - body: { - id: '507f1f77bcf86cd799439011', - message: 'Updated review message.' - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); diff --git a/.brightsec/tests/put-rest-wallet-balance.test.ts b/.brightsec/tests/put-rest-wallet-balance.test.ts deleted file mode 100644 index 15c8cbd8..00000000 --- a/.brightsec/tests/put-rest-wallet-balance.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { test, before, after } from 'node:test'; -import { SecRunner } from '@sectester/runner'; -import { AttackParamLocation, HttpMethod } from '@sectester/scan'; - -const timeout = 40 * 60 * 1000; -const baseUrl = process.env.BRIGHT_TARGET_URL!; - -let runner!: SecRunner; - -before(async () => { - runner = new SecRunner({ - hostname: process.env.BRIGHT_HOSTNAME!, - projectId: process.env.BRIGHT_PROJECT_ID! - }); - - await runner.init(); -}); - -after(() => runner.clear()); - -test('PUT /rest/wallet/balance', { signal: AbortSignal.timeout(timeout) }, async () => { - await runner - .createScan({ - tests: ['bopla', 'sqli', 'csrf', 'xss', 'id_enumeration'], - attackParamLocations: [AttackParamLocation.BODY], - starMetadata: {} - }) - .setFailFast(false) - .timeout(timeout) - .run({ - method: HttpMethod.PUT, - url: `${baseUrl}/rest/wallet/balance`, - body: { - UserId: 1, - paymentId: 123, - balance: 100 - }, - headers: { 'Content-Type': 'application/json' }, - auth: process.env.BRIGHT_AUTH_ID - }); -}); \ No newline at end of file From 11eae2d77967915b6fc65ea3385bdde7e484361e Mon Sep 17 00:00:00 2001 From: Viachaslau Date: Thu, 14 Aug 2025 23:51:56 +0400 Subject: [PATCH 6/6] test: optimize security tests to focus on specific vulnerabilities skip-checks:true --- .brightsec/tests/get-rest-chatbot-status.test.ts | 2 +- .brightsec/tests/get-rest-products-search.test.ts | 2 +- .brightsec/tests/get-rest-user-authentication-details.test.ts | 2 +- .brightsec/tests/post-api-addresss.test.ts | 2 +- .brightsec/tests/post-api-products.test.ts | 2 +- .brightsec/tests/post-rest-products-reviews.test.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.brightsec/tests/get-rest-chatbot-status.test.ts b/.brightsec/tests/get-rest-chatbot-status.test.ts index 403298cf..ba3fdcb1 100644 --- a/.brightsec/tests/get-rest-chatbot-status.test.ts +++ b/.brightsec/tests/get-rest-chatbot-status.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('GET /rest/chatbot/status', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['csrf', 'jwt', 'xss', 'osi', 'secret_tokens'], + tests: ['jwt'], attackParamLocations: [AttackParamLocation.HEADER], starMetadata: {} }) diff --git a/.brightsec/tests/get-rest-products-search.test.ts b/.brightsec/tests/get-rest-products-search.test.ts index f0602c14..874e04c8 100644 --- a/.brightsec/tests/get-rest-products-search.test.ts +++ b/.brightsec/tests/get-rest-products-search.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('GET /rest/products/search?q=:query', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['sqli', 'full_path_disclosure', 'xss', 'business_constraint_bypass'], + tests: ['sqli'], attackParamLocations: [AttackParamLocation.QUERY], starMetadata: {} }) diff --git a/.brightsec/tests/get-rest-user-authentication-details.test.ts b/.brightsec/tests/get-rest-user-authentication-details.test.ts index 58a41aa0..973f6a29 100644 --- a/.brightsec/tests/get-rest-user-authentication-details.test.ts +++ b/.brightsec/tests/get-rest-user-authentication-details.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('GET /rest/user/authentication-details', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['csrf', 'id_enumeration', 'xss', 'bopla', 'jwt'], + tests: ['jwt'], attackParamLocations: [AttackParamLocation.QUERY, AttackParamLocation.HEADER], starMetadata: {} }) diff --git a/.brightsec/tests/post-api-addresss.test.ts b/.brightsec/tests/post-api-addresss.test.ts index 16d2982c..a844ad5d 100644 --- a/.brightsec/tests/post-api-addresss.test.ts +++ b/.brightsec/tests/post-api-addresss.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('POST /api/addresss', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['bopla', 'csrf', 'sqli', 'xss', 'id_enumeration'], + tests: ['id_enumeration'], attackParamLocations: [AttackParamLocation.BODY], starMetadata: {} }) diff --git a/.brightsec/tests/post-api-products.test.ts b/.brightsec/tests/post-api-products.test.ts index b13263fe..b62eb53d 100644 --- a/.brightsec/tests/post-api-products.test.ts +++ b/.brightsec/tests/post-api-products.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('POST /api/products', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['csrf', 'sqli', 'xss', 'bopla', 'file_upload'], + tests: ['sqli'], attackParamLocations: [AttackParamLocation.BODY, AttackParamLocation.HEADER], starMetadata: {} }) diff --git a/.brightsec/tests/post-rest-products-reviews.test.ts b/.brightsec/tests/post-rest-products-reviews.test.ts index 2a59e95b..9b275bdb 100644 --- a/.brightsec/tests/post-rest-products-reviews.test.ts +++ b/.brightsec/tests/post-rest-products-reviews.test.ts @@ -21,7 +21,7 @@ after(() => runner.clear()); test('POST /rest/products/reviews', { signal: AbortSignal.timeout(timeout) }, async () => { await runner .createScan({ - tests: ['csrf', 'xss', 'nosql', 'bopla'], + tests: ['nosql'], attackParamLocations: [AttackParamLocation.BODY], starMetadata: {} })