Skip to content

fix: sanitize price parsing consistently#14

Merged
fernandofatech merged 2 commits into
mainfrom
fix/codeql-price-sanitization
May 16, 2026
Merged

fix: sanitize price parsing consistently#14
fernandofatech merged 2 commits into
mainfrom
fix/codeql-price-sanitization

Conversation

@fernandofatech
Copy link
Copy Markdown
Owner

Summary\n- replaces partial currency string cleanup with a global regex for all currency separators\n- resolves CodeQL incomplete sanitization findings\n\n## Validation\n- pnpm run build\n- pnpm audit --audit-level moderate\n- npm audit --audit-level=moderate

Fernando Azevedo added 2 commits May 15, 2026 23:26
….com

- Add .github/workflows/vercel.yml (preview on PR, prod on main)
- Add .github/workflows/frontend.yml (lint + build)
- Add .github/workflows/security.yml (if missing)
- Add SETUP.md with step-by-step Vercel + Cloudflare wiring

Workflows skip gracefully when VERCEL_TOKEN / ORG_ID / PROJECT_ID secrets are
not configured, so this PR keeps CI green until secrets are added.
Copilot AI review requested due to automatic review settings May 16, 2026 02:27
@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
queue-advisor-pricing-app Ready Ready Preview, Comment, Open in v0 May 16, 2026 2:29am

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make price-string parsing more robust/consistent (to address CodeQL sanitization findings) and also introduces Vercel deployment automation and setup documentation for publishing the app behind Cloudflare.

Changes:

  • Update SQS/Kafka cost parsing in the Compare page to strip $ and all commas via a global regex.
  • Add GitHub Actions workflows for frontend build and Vercel preview/production deploys.
  • Add a Vercel + Cloudflare deployment/setup guide (SETUP.md).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
SETUP.md Adds step-by-step instructions for deploying on Vercel and exposing the app via Cloudflare DNS.
app/compare/page.tsx Adjusts currency string sanitization prior to numeric parsing in the cost summary cards.
.github/workflows/vercel.yml Adds automated Vercel preview (PR) and production (main push) deployments.
.github/workflows/frontend.yml Adds a standalone workflow to install, lint, and build the frontend on PRs/pushes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/compare/page.tsx
Comment on lines +206 to +207
const sqsCost = parseFloat(analysis.pricing.sqs["10M"].replace(/[$,]/g, ""))
const kafkaCost = parseFloat(analysis.pricing.kafka["10M"].replace(/[$,]/g, ""))

permissions:
contents: read
pull-requests: write
Comment on lines +41 to +45
- run: npm install --no-audit --no-fund
if: steps.secrets.outputs.configured == 'true'
- run: npx vercel@${VERCEL_CLI_VERSION} pull --yes --environment=preview --token="$VERCEL_TOKEN"
if: steps.secrets.outputs.configured == 'true'
- run: npx vercel@${VERCEL_CLI_VERSION} build --token="$VERCEL_TOKEN"
Comment on lines +68 to +72
- run: npm install --no-audit --no-fund
if: steps.secrets.outputs.configured == 'true'
- run: npx vercel@${VERCEL_CLI_VERSION} pull --yes --environment=production --token="$VERCEL_TOKEN"
if: steps.secrets.outputs.configured == 'true'
- run: npx vercel@${VERCEL_CLI_VERSION} build --prod --token="$VERCEL_TOKEN"
Comment on lines +21 to +23
- run: npm install --no-audit --no-fund
- run: npm run lint --if-present || true
- run: npm run build
with:
node-version: 22
- run: npm install --no-audit --no-fund
- run: npm run lint --if-present || true
Comment thread SETUP.md
Comment on lines +1 to +6
# Setup — Vercel + Cloudflare

Connect this repository to Vercel and expose it on `queue.moretes.com` via
Cloudflare DNS.

## 1. Create the Vercel project
@fernandofatech fernandofatech merged commit bc59694 into main May 16, 2026
10 checks passed
@fernandofatech fernandofatech deleted the fix/codeql-price-sanitization branch May 16, 2026 02:33
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