From 2c69e1a107c213e86cc4b84e7bbb017ce37cb660 Mon Sep 17 00:00:00 2001 From: bstack-security-github <116066275+bstack-security-github@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:26:15 +0530 Subject: [PATCH 01/12] Adding Code Scanner Semgrep.yml workflow file --- .github/workflows/Semgrep.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/Semgrep.yml diff --git a/.github/workflows/Semgrep.yml b/.github/workflows/Semgrep.yml new file mode 100644 index 0000000..0347afd --- /dev/null +++ b/.github/workflows/Semgrep.yml @@ -0,0 +1,48 @@ +# Name of this GitHub Actions workflow. +name: Semgrep + +on: + # Scan changed files in PRs (diff-aware scanning): + # The branches below must be a subset of the branches above + pull_request: + branches: ["master", "main"] + push: + branches: ["master", "main"] + schedule: + - cron: '0 6 * * *' + + +permissions: + contents: read + +jobs: + semgrep: + # User definable name of this GitHub Actions job. + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + name: semgrep/ci + # If you are self-hosting, change the following `runs-on` value: + runs-on: ubuntu-latest + + container: + # A Docker image with Semgrep installed. Do not change this. + image: returntocorp/semgrep + + # Skip any PR created by dependabot to avoid permission issues: + if: (github.actor != 'dependabot[bot]') + + steps: + # Fetch project source with GitHub Actions Checkout. + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + # Run the "semgrep ci" command on the command line of the docker image. + - run: semgrep ci --sarif --output=semgrep.sarif + env: + # Add the rules that Semgrep uses by setting the SEMGREP_RULES environment variable. + SEMGREP_RULES: p/default # more at semgrep.dev/explore + + - name: Upload SARIF file for GitHub Advanced Security Dashboard + uses: github/codeql-action/upload-sarif@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0 + with: + sarif_file: semgrep.sarif + if: always() \ No newline at end of file From f7d5f0f4c2149748f3824b6ad4cd97b04a54c522 Mon Sep 17 00:00:00 2001 From: bstack-security-github <116066275+bstack-security-github@users.noreply.github.com> Date: Mon, 3 Jul 2023 20:46:07 +0530 Subject: [PATCH 02/12] Adding CODEOWNERS file --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7e1f1b4..09a587d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,3 @@ .github/* @browserstack/asi-devs + +* @browserstack/automate-public-repos From 4d1df5ea1d0018b1956409c1b53c59b89b86aed8 Mon Sep 17 00:00:00 2001 From: Neha Agarwal Date: Fri, 7 Jul 2023 18:40:30 +0530 Subject: [PATCH 03/12] Fix workflow file --- .github/workflows/reviewing_changes.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index b5fdf90..65d1866 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -6,8 +6,8 @@ name: NodeJS Test workflow on workflow_dispatch on: workflow_dispatch: inputs: - pull_request_number: - description: 'The pull request number to build' + commit_sha: + description: 'The commit id to build' required: true jobs: @@ -27,16 +27,12 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: refs/pull/${{ github.event.inputs.pull_request_number }}/head - - name: Fetch Commit SHA - run: | - git log -1 --format='%H' - echo "commit_sha=$(git log -1 --format='%H')" >> $GITHUB_ENV - echo "commit_sha=$(git log -1 --format='%H')" >> $env:GITHUB_ENV + ref: ${{ github.event.inputs.commit_sha }} - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-in-progress env: job_name: Codecept-js Repo ${{ matrix.node }} - ${{ matrix.os }} Sample + commit_sha: ${{ github.event.inputs.commit_sha }} with: github-token: ${{ github.token }} script: | @@ -59,14 +55,11 @@ jobs: - name: Install dependencies run: npm install - - name: Run single tests - run: npm run single + - name: Run sample tests + run: npm run sample-test - name: Run local tests - run: npm run local - - - name: Run parallel tests - run: npm run parallel + run: npm run sample-local-test - if: always() uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 @@ -74,6 +67,7 @@ jobs: env: conclusion: ${{ job.status }} job_name: Codecept-js Repo ${{ matrix.node }} - ${{ matrix.os }} Sample + commit_sha: ${{ github.event.inputs.commit_sha }} with: github-token: ${{ github.token }} script: | From 657ccc61a2017cab83a84239fbac9f895806badc Mon Sep 17 00:00:00 2001 From: Neha Agarwal Date: Mon, 10 Jul 2023 13:07:34 +0530 Subject: [PATCH 04/12] Fix workflow file --- .github/workflows/reviewing_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index 65d1866..2f32c1e 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: inputs: commit_sha: - description: 'The commit id to build' + description: 'The full commit id to build' required: true jobs: From 95bbc25e5a2950c18e32908ecfdb2c8122565cd9 Mon Sep 17 00:00:00 2001 From: 07souravkunda Date: Fri, 3 Nov 2023 20:04:07 +0530 Subject: [PATCH 05/12] add: staging npm package publish --- .github/workflows/reviewing_changes.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index 2f32c1e..bdf6b5a 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -9,6 +9,9 @@ on: commit_sha: description: 'The full commit id to build' required: true + package_url: + description: 'Staging package url' + required: false jobs: comment-run: @@ -17,7 +20,7 @@ jobs: fail-fast: false max-parallel: 3 matrix: - node: ['14', '16', '18'] + node: ['14', '16', '18', '20'] os: [ macos-latest, windows-latest, ubuntu-latest ] name: Codecept-js Repo ${{ matrix.node }} - ${{ matrix.os }} Sample env: @@ -47,6 +50,19 @@ jobs: if (result.status !== 201) { console.log('Failed to create check run') } + + - name: Setup staging npm package + if: ${{ github.event.inputs.package_url != '' }} + run: | + echo 'Publishing tar.gz to local registry' + curl -o staging_package.tgz '${{ github.event.inputs.package_url }}' + npm install verdaccio -g + verdaccio & + npm config set registry http://localhost:4873 + npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873 + npm publish staging_package.tgz --registry http://localhost:4873/ + shell: bash + - name: Setup node uses: actions/setup-node@v3 with: From 7a9651b46f7e03605e694b736a305336ed57fcc0 Mon Sep 17 00:00:00 2001 From: 07souravkunda Date: Thu, 9 Nov 2023 15:27:24 +0530 Subject: [PATCH 06/12] fix: setup node --- .github/workflows/reviewing_changes.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index bdf6b5a..0fe6e7e 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -51,6 +51,11 @@ jobs: console.log('Failed to create check run') } + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - name: Setup staging npm package if: ${{ github.event.inputs.package_url != '' }} run: | @@ -63,11 +68,6 @@ jobs: npm publish staging_package.tgz --registry http://localhost:4873/ shell: bash - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - name: Install dependencies run: npm install From 68dc048a4b8124ff4279655c0aa4c6f1a4115988 Mon Sep 17 00:00:00 2001 From: 07souravkunda Date: Mon, 11 Dec 2023 11:49:10 +0530 Subject: [PATCH 07/12] fix: semgrep --- .github/workflows/reviewing_changes.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index 0fe6e7e..9184f28 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -26,6 +26,7 @@ jobs: env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + PACKAGE_URL: ${{ github.event.inputs.package_url }} steps: - uses: actions/checkout@v3 @@ -60,7 +61,7 @@ jobs: if: ${{ github.event.inputs.package_url != '' }} run: | echo 'Publishing tar.gz to local registry' - curl -o staging_package.tgz '${{ github.event.inputs.package_url }}' + curl -o staging_package.tgz "$PACKAGE_URL" npm install verdaccio -g verdaccio & npm config set registry http://localhost:4873 From 7784f446669704e83a951523da6a4abd0268f8c2 Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:54:40 +0530 Subject: [PATCH 08/12] Update reviewing_changes.yml --- .github/workflows/reviewing_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index 9184f28..2a12ba6 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -62,7 +62,7 @@ jobs: run: | echo 'Publishing tar.gz to local registry' curl -o staging_package.tgz "$PACKAGE_URL" - npm install verdaccio -g + npm install verdaccio@5.32.3 -g verdaccio & npm config set registry http://localhost:4873 npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873 From 5b164e6198b6e707e9683168e3d83618c57465b8 Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:15:25 +0530 Subject: [PATCH 09/12] Update reviewing_changes.yml --- .github/workflows/reviewing_changes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewing_changes.yml b/.github/workflows/reviewing_changes.yml index 2a12ba6..de42df9 100644 --- a/.github/workflows/reviewing_changes.yml +++ b/.github/workflows/reviewing_changes.yml @@ -62,7 +62,7 @@ jobs: run: | echo 'Publishing tar.gz to local registry' curl -o staging_package.tgz "$PACKAGE_URL" - npm install verdaccio@5.32.3 -g + npm install verdaccio@5.32.2 -g verdaccio & npm config set registry http://localhost:4873 npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873 From 1af9de33d8de163cfb3d05e4103be7d14c0bb2bf Mon Sep 17 00:00:00 2001 From: 07souravkunda Date: Thu, 13 Feb 2025 16:33:07 +0530 Subject: [PATCH 10/12] change: version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2e3926..29f20e0 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/browserstack/codecept-js-browserstack#readme", "devDependencies": { - "codeceptjs": "^3.2.3", + "codeceptjs": "3.2.3", "webdriverio": "^7.17.4", "browserstack-node-sdk": "latest" }, From 3c3385af1eff1c4ee44ce636d3b045caebd21eb2 Mon Sep 17 00:00:00 2001 From: 07souravkunda Date: Fri, 14 Feb 2025 13:51:26 +0530 Subject: [PATCH 11/12] change: version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 29f20e0..8766321 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/browserstack/codecept-js-browserstack#readme", "devDependencies": { - "codeceptjs": "3.2.3", + "codeceptjs": "3.6.9", "webdriverio": "^7.17.4", "browserstack-node-sdk": "latest" }, From 75fd7986f8657a693038f86c43885bf1e9c4d0cc Mon Sep 17 00:00:00 2001 From: Sourav Kunda <50537259+07souravkunda@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:34:16 +0530 Subject: [PATCH 12/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a926032..d72b694 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Integrating CodeceptJS Node.js with BrowserStack BrowserStack ## Prerequisite -* [Node.js](https://nodejs.org/en/download/) version 12 or higher is installed on your machine. +* [Node.js](https://nodejs.org/en/download/) version 12 or higher is installed on your machine. ## Setup * Clone the repo