Skip to content

fix(security): enforce schema validation for admin insights query params - #1026

Open
d-oit wants to merge 1 commit into
mainfrom
jules-10084567394162464195-d3104882
Open

fix(security): enforce schema validation for admin insights query params#1026
d-oit wants to merge 1 commit into
mainfrom
jules-10084567394162464195-d3104882

Conversation

@d-oit

@d-oit d-oit commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Strictly validate limit and offset query parameters in GET /api/admin/insights via AdminInsightsQuerySchema to prevent invalid input processing.


PR created automatically by Jules for task 10084567394162464195 started by @d-oit

Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 22, 2026

Copy link
Copy Markdown

Deploying do-epub-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9177c7e
Status: ✅  Deploy successful!
Preview URL: https://6d76e166.do-epub-studio.pages.dev
Branch Preview URL: https://jules-10084567394162464195-d.do-epub-studio.pages.dev

View logs

@repowise-bot

repowise-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

✅ Health of changed files: 9.3 → 9.4 (+0.1)
⚠️ Change risk: moderate, riskier than 44% of this repo's commits.

📋 At a glance
1 hotspot touched · 1 dead-code finding. Scoped to apps.

✅ Health gate: passed

🔎 More signals (3)

🗺️ Change map

flowchart LR
  subgraph PR ["Changed in this PR (2 with dependents)"]
    f_apps_worker_src_routes_admin_insights_ts[".../admin/insights.ts"]:::changed
    f_packages_schema_src_schemas_insights_ts[".../schemas/insights.ts"]:::changed
  end
  f_apps_worker_src_routes_admin_index_ts[".../admin/index.ts"]
  f_apps_worker_src_routes_admin_insights_ts --> f_apps_worker_src_routes_admin_index_ts
  f_packages_schema_src_schemas_index_ts[".../schemas/index.ts"]
  f_packages_schema_src_schemas_insights_ts --> f_packages_schema_src_schemas_index_ts
  classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
  classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
  classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Loading

Solid arrows: code that imports the changed files (2 direct dependents, from the last indexed snapshot). Dashed: history/tests.

🔥 Hotspot touched (1)

  • .../__tests__/routes.admin.insights.test.ts: 1 commits/90d, 0 dependents

💀 Dead code (2 findings)

  • 💀 .../admin/insights.ts MAX_OFFSET (confidence 0.65)
  • ✅ Removed: MAX_OFFSET in .../admin/insights.ts

📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-08-22 00:48 UTC

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -6 complexity · -16 duplication

Metric Results
Complexity -6
Duplication -16

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

Copy link
Copy Markdown

🚀 Performance Report

🛠️ CI & Workflow

Metric Value Limit Trend Status
Total CI Duration 3.75 min 15.00 min -
Pnpm Cache Hit Hit - -

⚡ Turbo Task Performance

Task Duration (s) Cache Status Trend Status
@do-epub-studio/reader-core#build 0.00 MISS - 🔄
@do-epub-studio/schema#build 0.00 MISS - 🔄
@do-epub-studio/shared#build 0.00 MISS - 🔄
@do-epub-studio/testkit#build 0.00 MISS - 🔄
@do-epub-studio/ui#build 0.00 MISS - 🔄
@do-epub-studio/web#build 0.00 MISS - 🔄
@do-epub-studio/worker#build 0.00 MISS - 🔄

Cache Hit Ratio: 0% (0/7 tasks)

🧪 Test Stability

Metric Value Trend Status
Total Tests 0 - -
Failed Tests 0 -
Flaky Rate 0.00% -

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant