Skip to content

[dev] [Marfuen] mariano/vendor-research-rescoring#2760

Merged
Marfuen merged 3 commits into
mainfrom
mariano/vendor-research-rescoring
May 6, 2026
Merged

[dev] [Marfuen] mariano/vendor-research-rescoring#2760
Marfuen merged 3 commits into
mainfrom
mariano/vendor-research-rescoring

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 6, 2026

This is an automated pull request to merge mariano/vendor-research-rescoring into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Rescores vendor inherent and residual risk using researched posture data so onboarding yields evidence‑grounded scores instead of the conservative default. Automatically chains research → scoring per vendor to update the org Vendor row.

  • New Features
    • Added score-vendor-risk task (idempotent): reads org Vendor + GlobalVendors by website, uses @ai-sdk/openai to produce Likelihood/Impact + rationale with a calibrated rubric, overwrites the four risk fields, and skips if no website or no GlobalVendors data.
    • Updated research-vendor (@trigger.dev/sdk) to accept optional scoreContext and enqueue score-vendor-risk after saving GlobalVendors or when an existing row is found; logs enqueue errors without failing research.
    • triggerVendorResearch now passes scoreContext so bulk onboarding chains research → scoring.

Written for commit ebe0b57. Summary will update on new commits.

…e data

The onboarding extraction pass scores vendor inherent risk
conservatively from the user's Q&A signals only — it has no posture
data, so well-attested vendors get the generic (possible × moderate)
default. This adds a follow-up scoring pass that runs once
research-vendor has populated GlobalVendors with certifications,
subprocessors, type, and trust-page URLs. The per-org Vendor row
gets re-scored with that evidence on hand.

Components:

- New trigger task `score-vendor-risk` (apps/app/src/trigger/tasks/
  scrape/score-vendor-risk.ts). Idempotent — fetches the org's
  Vendor row + the GlobalVendors row by website, calls gpt-4.1-mini
  with a calibrated prompt that anchors each Likelihood / Impact
  bucket to attestation criteria (SOC 2 Type II, ISO 27001, ISO
  42001, HIPAA, PCI DSS, FedRAMP, etc.), and updates the four
  inherent + residual fields. Bails early if vendor has no
  website OR if GlobalVendors hasn't been populated yet.

- research-vendor accepts an optional `scoreContext: { vendorId,
  organizationId }` payload field. After saving GlobalVendors
  (whether new or existing), it enqueues score-vendor-risk for the
  per-org Vendor row. Existing-vendor short-circuit also kicks
  scoring so customers don't get stuck with the extraction default
  when GlobalVendors was already populated by a previous research
  run.

- triggerVendorResearch (orchestrator) passes `scoreContext` so the
  bulk onboarding fan-out chains research → scoring per vendor.

Net effect: vendors come out of onboarding with a posture-grounded
score (e.g. GitHub with SOC 2 + ISO 27001 should land at unlikely ×
moderate ≈ 3/10) instead of the conservative default. No prompt
contains a hardcoded vendor name list — calibration runs entirely
off the researched attributes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment May 6, 2026 2:22pm
comp-framework-editor Ready Ready Preview, Comment May 6, 2026 2:22pm
portal Ready Ready Preview, Comment May 6, 2026 2:22pm

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

…ch-rescoring

# Conflicts:
#	apps/app/src/trigger/tasks/scrape/research.ts
@Marfuen Marfuen merged commit e999c72 into main May 6, 2026
8 of 11 checks passed
@Marfuen Marfuen deleted the mariano/vendor-research-rescoring branch May 6, 2026 14:20
claudfuen pushed a commit that referenced this pull request May 6, 2026
# [3.44.0](v3.43.1...v3.44.0) (2026-05-06)

### Bug Fixes

* **api:** correct the total number of active members from overview scores ([ed9561f](ed9561f))
* **api:** make submission endpoints accessible as an employee ([3c96a1d](3c96a1d))
* **billing:** surface wallet credits to pentest + bg-check UIs ([05d87d4](05d87d4))
* **treatment-plan:** cap linked-work lists and treatment plan body height ([8a1c46f](8a1c46f)), closes [#36](#36) [#37](#37)
* **treatment-plan:** cap linked-work lists and treatment plan body height ([46d7e83](46d7e83)), closes [#36](#36) [#37](#37)
* **upgrade:** keep self-hosted check on the page to avoid OSS regression ([e42e6ef](e42e6ef))

### Features

* **db:** ship CA bundle with @trycompai/db, clean up debug routes ([#2767](#2767)) ([84da90c](84da90c)), closes [#2761](#2761) [#2762](#2762) [#2763](#2763)
* **integration-platform:** remove code-based jumpcloud, route via DIP ([2ab5b78](2ab5b78))
* **risks:** treatment plan as first-class + vendor AI widening + matrix polish ([1a97746](1a97746)), closes [hi#confidence](https://github.com/hi/issues/confidence) [#2671](#2671) [#2](https://github.com/trycompai/comp/issues/2) [#3](#3) [#9](#9) [#4](#4) [#5](#5) [#7](#7) [#26](#26) [#6](#6) [#1](https://github.com/trycompai/comp/issues/1) [#10](#10) [#36](#36) [#35](#35) [#39](#39) [#37](#37) [#32](#32) [#33](#33) [#34](#34) [#17](#17) [#18](#18) [#19](#19) [#20](#20) [#21](#21) [#22](#22) [#30](#30) [#31](#31) [#29](#29) [#23](#23) [#40](#40) [#28](#28) [#27](#27) [#38](#38) [#24](#24) [#2671](#2671)
* **vendors:** refine inherent risk score after research lands posture data ([#2760](#2760)) ([e999c72](e999c72))
* verified-TLS to RDS from every runtime ([#2761](#2761)) ([2bde7ad](2bde7ad))
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.44.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants