Skip to content

Security Audit & Remediation: example-apps/tip-splitter/app#139

Open
inlined wants to merge 1 commit into
firebase:mainfrom
inlined:security-audit/tip-splitter
Open

Security Audit & Remediation: example-apps/tip-splitter/app#139
inlined wants to merge 1 commit into
firebase:mainfrom
inlined:security-audit/tip-splitter

Conversation

@inlined

@inlined inlined commented Jun 24, 2026

Copy link
Copy Markdown
Member

Security Audit & Remediation: example-apps/tip-splitter/app

A. Previous CVEs

B. Changes Made

  • Updated next to ^15.5.19 (resolving next CVEs)
  • Updated postcss to ^8.5.10
  • Added overrides for postcss and uuid to pin safe versions
  • Removed deprecated patch-package
  • Added smoke test harness (audit_verify.mjs)

C. Remaining CVEs

  • Transitive dependencies from @babel/runtime, @grpc/grpc-js, @opentelemetry/core, @opentelemetry/sdk-node, protobufjs, @tootallnate/once, @trpc/server, ajv, axios, brace-expansion, esbuild, fast-uri, follow-redirects, form-data, glob, handlebars, js-yaml, jws, lodash, minimatch, path-to-regexp, picomatch, qs, tmp, and yaml.

D. Introduced CVEs

  • None

E. Testing Strategy

  • Ran custom smoke test harness (node example-apps/tip-splitter/app/audit_verify.mjs) - 100% passing.
  • Verified build compiles successfully

@wiz-9635d3485b

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 High
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 High

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an automated verification script audit_verify.mjs for the tip-splitter application and updates several dependencies in package.json and package-lock.json, notably upgrading next to ^15.5.19 and postcss to ^8.5.10, removing patch-package, and adding overrides for postcss and uuid. Feedback on the verification script points out that directly referencing crypto.randomUUID can throw a ReferenceError in certain Node.js environments, suggesting the use of optional chaining on globalThis.crypto instead.

console.log('Running automated manual verification for tip-splitter...');
// Validate Node environment built-ins
assert.strictEqual(typeof fetch, 'function', 'Global fetch built-in should exist');
assert.strictEqual(typeof crypto.randomUUID, 'function', 'crypto.randomUUID built-in should exist');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Accessing crypto.randomUUID directly will throw a ReferenceError: crypto is not defined in Node.js environments where crypto is not globally bound (such as Node.js versions prior to 19). To safely check for the existence of the global crypto.randomUUID built-in without throwing a ReferenceError, use optional chaining on globalThis.crypto.

Suggested change
assert.strictEqual(typeof crypto.randomUUID, 'function', 'crypto.randomUUID built-in should exist');
assert.strictEqual(typeof globalThis.crypto?.randomUUID, 'function', 'crypto.randomUUID built-in should exist');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node versions < 20 are no longer supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants