Skip to content

Bump the npm_and_yarn at /research-hub-web security update group in /research-hub-web with 1 update#430

Open
dependabot[bot] wants to merge 2148 commits intomasterfrom
dependabot/npm_and_yarn/research-hub-web/cypress-13.5.0
Open

Bump the npm_and_yarn at /research-hub-web security update group in /research-hub-web with 1 update#430
dependabot[bot] wants to merge 2148 commits intomasterfrom
dependabot/npm_and_yarn/research-hub-web/cypress-13.5.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Nov 9, 2023

Bumps the npm_and_yarn at /research-hub-web security update group in /research-hub-web with 1 update: cypress.

Release notes

Sourced from cypress's releases.

v.13.5.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-5-0

v13.4.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-4-0

v13.3.3

Changelog: https://docs.cypress.io/guides/references/changelog#13-3-3

v13.3.2

Changelog: https://docs.cypress.io/guides/references/changelog#13-3-2

v13.3.1

Changelog: https://docs.cypress.io/guides/references/changelog#13-3-1

v13.3.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-3-0

v13.2.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-2-0

v13.1.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-1-0

v13.0.0

Changelog: https://docs.cypress.io/guides/references/changelog#13-0-0

v12.17.4

Changelog: https://docs.cypress.io/guides/references/changelog#12-17-4

v12.17.3

Changelog: https://docs.cypress.io/guides/references/changelog#12-17-3

v12.17.2

Changelog: https://docs.cypress.io/guides/references/changelog#12-17-2

v12.17.1

Changelog: https://docs.cypress.io/guides/references/changelog#12-17-1

v12.17.0

Changelog: https://docs.cypress.io/guides/references/changelog#12-17-0

v12.16.0

Changelog: https://docs.cypress.io/guides/references/changelog#12-16-0

v12.15.0

Changelog: https://docs.cypress.io/guides/references/changelog#12-15-0

v12.14.0

Changelog: https://docs.cypress.io/guides/references/changelog#12-14-0

... (truncated)

Commits
  • a23dba1 chore: release 13.5.0 (#28278)
  • 7392f61 test: updating path separator for mochaEvents (#28265)
  • 79da763 chore: release @​cypress/webpack-dev-server-v3.7.0
  • 176280d chore: release 13.5.0 - update changelog (#28262)
  • d70ffea fix: runIfWaitingForDebugger when targets are reloaded after crashing (#28254)
  • e8fc268 feat: add support for angular 17 (#28152)
  • 9f19f9a test: update mochaEvent snapshots to be auto-generated (#28224)
  • 934f215 chore: add after:browser:launch node event (#28180)
  • eab1730 fix: handle download from element missing download attribute (#28222)
  • db8609e fix: Pass flag to chrome to disable translation prompt when running tests (#2...
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by cypress-npm-publisher, a new releaser for cypress since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

cakr322 and others added 25 commits April 14, 2023 14:07
Fix failed start up due to Contentful type changes
…search-stage-url

RSM-3036: stage: replace search with url
Bumps the npm_and_yarn at /research-hub-web security update group in /research-hub-web with 1 update: [cypress](https://github.com/cypress-io/cypress).

- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v7.7.0...v13.5.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 9, 2023
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Nov 9, 2023

Dependabot tried to add @Trombach, @cakr322 and @eric-el-tan as reviewers to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/UoA-eResearch/hub-stack/pulls/430/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the UoA-eResearch/hub-stack repository. // See: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request

@lugn621 lugn621 force-pushed the dependabot/npm_and_yarn/research-hub-web/cypress-13.5.0 branch from eecbe7e to 5d996bb Compare April 2, 2026 02:11
Comment on lines +15 to +36
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 18

- name: Install Node.js dependencies
working-directory: ./research-hub-web
run: npm ci --force

- name: Install Angular CLI
run: npm install -g @angular/cli

- name: ng lint
working-directory: ./research-hub-web
run: ng lint

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 3 days ago

In general, the fix is to explicitly set a least-privilege permissions block so that the GITHUB_TOKEN has only the minimal rights needed. For this workflow, all steps are local (checkout, install dependencies, run lint), so read access to repository contents is sufficient.

The best fix without changing functionality is to add permissions: contents: read at the workflow root, above jobs:. This will apply to all jobs that don’t define their own permissions. No steps in run-linters need write access to contents, issues, or pull requests, so contents: read is adequate. The only change is to .github/workflows/linting.yml, inserting a permissions block after the on: section and before jobs:; no imports or additional definitions are needed.

Suggested changeset 1
.github/workflows/linting.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
--- a/.github/workflows/linting.yml
+++ b/.github/workflows/linting.yml
@@ -10,6 +10,9 @@
     branches:
       - master
 
+permissions:
+  contents: read
+
 jobs:
   run-linters:
     name: Run linters
EOF
@@ -10,6 +10,9 @@
branches:
- master

permissions:
contents: read

jobs:
run-linters:
name: Run linters
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +14 to +33
name: Create Sentry Release
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Get Branch
id: var
run: echo ::set-output name=branch::${GITHUB_REF#refs/*/}
- name: Output Branch
run: echo ${{ steps.var.outputs.branch }}
- name: Notify Sentry
# https://github.com/getsentry/action-release
uses: getsentry/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: university-of-auckland-7o
SENTRY_PROJECT: research-hub
with:
environment: ${{ steps.var.outputs.branch }} No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 3 days ago

In general, you fix this by adding a permissions: block that grants only the minimal scopes required for the workflow, either at the root (affecting all jobs) or at the specific job level. For a typical Sentry release workflow that only checks out code and calls an external action using SENTRY_AUTH_TOKEN, no GitHub write permissions are needed; contents: read is usually sufficient (and is equivalent to a read-only default).

For this specific workflow in .github/workflows/sentry.yml, the least invasive change is to add permissions: contents: read to the sentry-release job. That constrains the GITHUB_TOKEN for this job only, without altering behavior: actions/checkout still works with contents: read, and getsentry/action-release uses the Sentry auth token from secrets, not GITHUB_TOKEN. Concretely, modify the sentry-release job definition (around line 13–16) to insert:

    permissions:
      contents: read

directly under runs-on: ubuntu-latest (or directly under the job name; placement within the job block is flexible as long as indentation is correct).

Suggested changeset 1
.github/workflows/sentry.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/sentry.yml b/.github/workflows/sentry.yml
--- a/.github/workflows/sentry.yml
+++ b/.github/workflows/sentry.yml
@@ -13,6 +13,8 @@
   sentry-release:
     name: Create Sentry Release
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
 
     steps:
       - name: Check out Git repository
EOF
@@ -13,6 +13,8 @@
sentry-release:
name: Create Sentry Release
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out Git repository
Copilot is powered by AI and may make mistakes. Always verify output.
run: echo ${{ steps.var.outputs.branch }}
- name: Notify Sentry
# https://github.com/getsentry/action-release
uses: getsentry/[email protected]

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Sentry Release' step
Uses Step
uses 'getsentry/action-release' with ref 'v1.1.6', not a pinned commit hash

module.exports.search = async (event, context) => {
try {
console.log(`Received query: ${event.body}`);

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.

Copilot Autofix

AI 3 days ago

In general, to fix log injection when logging user-controlled values, sanitize or normalize those values before logging. For plain-text logs, a common and simple mitigation is to remove carriage-return and newline characters from user input and to clearly delimit or quote user-controlled fields in log messages.

For this specific code, the best fix with minimal functional impact is:

  • Before logging event.body, derive a sanitized version that strips \r and \n characters.
  • Log the sanitized body instead of the raw event.body.
  • Optionally, clearly label the value as user input in the log message (which is already effectively done by "Received query: ...").

Concretely, in hub-search-proxy/handler.js around line 53 inside module.exports.search, introduce a new variable (e.g., sanitizedBody) that uses String.prototype.replace with a regular expression to remove \r and \n from event.body, and then log that sanitized value. No new imports are needed; replace is part of standard JavaScript. The rest of the function should continue to use the original event.body for parsing so that existing behavior is unchanged.

Suggested changeset 1
hub-search-proxy/handler.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/hub-search-proxy/handler.js b/hub-search-proxy/handler.js
--- a/hub-search-proxy/handler.js
+++ b/hub-search-proxy/handler.js
@@ -50,7 +50,8 @@
 
 module.exports.search = async (event, context) => {
     try {
-        console.log(`Received query: ${event.body}`);
+        const sanitizedBody = String(event.body).replace(/\r|\n/g, '');
+        console.log(`Received query: ${sanitizedBody}`);
         const requestBody = JSON.parse(event.body);
         let queryString = '';
         let size = 10;
EOF
@@ -50,7 +50,8 @@

module.exports.search = async (event, context) => {
try {
console.log(`Received query: ${event.body}`);
const sanitizedBody = String(event.body).replace(/\r|\n/g, '');
console.log(`Received query: ${sanitizedBody}`);
const requestBody = JSON.parse(event.body);
let queryString = '';
let size = 10;
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants