Repository navigation
[pull] main from CPAtoCybersecurity:main - #25
Merged
Merged
Conversation
…ons (#288) An assessment now names a SEPARATE system per record type - findings (Jira/ServiceNow/Freshservice), artifacts (SharePoint/Jira/Google Drive), controls (Hyperproof/Confluence) - and each evaluation item accepts one or more typed external links added directly on the panel, replacing the dead "Linked work items" placeholder left by the Atlassian removal. - externalTracking v12: { enabled, systems: { findings, artifacts, controls } }; shape-detecting normalize converts the #284 single systemName (and an unreleased interim array shape) to per-type slots - observation.externalLinks [{ id, type, url }]: normalized at the producer (updateObservation), capped, ids collision-free; render sites gate on sanitizeExternalUrl with rel="noopener noreferrer" - wizard: three optional per-type system-name inputs - share export: system names REBUILT blank + observation links emptied by default; include-private keeps; complete backups unaffected; restore shape-repairs unconditionally (tamper-safe); packImport emits the new shape - Findings form label follows systems.findings; org-global Controls/Artifacts record pages keep static labels (no assessment context) 381 jest across 25 suites (+17); build compiles; changed non-allowlisted files eslint-clean at --max-warnings=0. Closes #288
…pe-external-links Per-type external tracking systems + add-not-select links on evaluations (#288)
The 5-point CMMI section was re-cited to Simply Cyber Academy in #285, but the About Scoring legend caption (and its SCREENSHOTS.md mirror) still carried the old attribution.
…ctations table The 5-Point Maturity Scale table now shows the Simply Cyber Academy course table - per-level Expectation of Policy / Expectation of Process, Levels 1-5 (level 0 stays explained in the intro prose: the activity is not performed at all). CMMI_LEVELS is untouched so the wizard, score dropdowns, and report legends keep their short labels.
…-legend-citation Reference: Simply Cyber Academy citation + course policy/process CMMI table
…ditor rename (#290, #291) Issue #291 — year, not just quarter: - Assessments carry a year (the calendar year the Q1-Q4 scores cover). Schema v12->v13 stamps it from each assessment's own createdDate (current year when missing/invalid) plus an empty users scope. - Wizard Step 1 gains a Year input (defaults to the current year). - Evaluation Details panel shows the year directly above the Quarter row; the terminal status bar shows a YEAR segment ahead of QTR; the executive summary PDF header reads "Quarter: Q<n> <year>". Issue #290 — users, evidence step, experimental labels, auditor: - The Evidence Upload wizard step (upload documents "to give your assessment a head start") is removed, along with its handlers/state. - New wizard Step 3 "Users": add people in scope by name, email address, and role (Auditor / Control Owner / Stakeholder). Rows are created in the existing user directory via findOrCreateUser (title = role label) and stored on the assessment as { userId, role } pairs only - no names/emails are embedded on the assessment record, so share exports carry no new PII surface. - normalizeAssessmentYear/normalizeAssessmentUsers enforce both fields at every producer (createAssessment, updateAssessment, migration), issue #288 doctrine: junk roles dropped, dedupe by userId, PII stripped. - Every AI surface that shows the llama badge is labeled Experimental: Score Suggestion, Score Explainer, Implementation Guidance, AI Assistant, Document Upload provider chips, and the wizard AI card now reads "Generate with AI (Experimental, optional)". - Evaluation panel label "Assignee" renamed to "Auditor" (detail panel + list header). The persisted field stays auditorId; Artifacts page and CSV export headers unchanged. Tests: 410/410 (26 suites, +26 new: v13 migration incl. tamper/PII canaries, year/users normalizers, producer guards, backup + share-export ride-through). Changed non-allowlisted files eslint --max-warnings=0 clean; allowlisted files' warning counts identical to main. Closes #290 Closes #291 Reviewer-round hardening (all findings adopted): - Restore path (dataImport.js) now unconditionally normalizes year/users — a tampered current-version backup cannot smuggle PII inside assessment.users past the producer guards (regression-tested). - The user directory (real names + emails) no longer rides DEFAULT share exports: data.users is emptied, userCount recomputed; include-private keeps it, complete backups unaffected. Deliberate behavior change, same class as issue #284's artifacts.link scrub. PRIVATE_DATA.md documents it. - Wizard user resolution is email-authoritative (findOrCreateUserByEmail): distinct emails always yield distinct users; a typed email is never silently discarded by findOrCreateUser's name fallback (CSV lanes keep the old resolver). - packImport stamps year (record vintage) + users [] so every producer emits the full current shape.
Commit 94234c8 moved the assessment materials into ASSESSMENT_CATALOG/ and deleted `EXAMPLE BUSINESS CASE STUDY FOR ASSESSMENT/` and `Sample_Artifacts/`, but three hardcoded github.com URLs in src/ still pointed at the old paths and returned 404: - Settings.js — the Alma Security Case Study Materials card (the issue) now points at ASSESSMENT_CATALOG. - defaultArtifactsData.js — seed artifacts AR-1 and AR-3 now point at 5_Artifacts/Evidence/EVD-phish-campaign-2025-05-26.xlsx and 5_Artifacts/Tickets/TKT-SOC-1004.md, the successors git records for those files. Nothing caught this: a directory rename silently orphans every hardcoded URL that referenced it, and the breakage is only visible to a user who clicks. So this also adds a guard — repoLinks.js extracts every main-branch URL for this repo from the source tree and repoLinks.test.js asserts each resolves to a path on disk. It runs in the existing jest job, makes no network calls, and covers all 41 static links, not just the three fixed here. The extractor deliberately ignores commit-pinned URLs (permanent), links to other people's forks, and runtime template literals, which cannot be resolved statically.
Advisor round on the first commit surfaced two gaps a green test run cannot show: - Fixing DEFAULT_ARTIFACTS only helps new installs. The artifacts store persists to localStorage, so anyone who has already opened the app keeps the dead links forever. Adds store version 7, which rewrites artifact links on exact match against a relocation map — a link the user typed themselves is never touched. It runs after the version chain rather than as another branch in it, because those branches return early and a user coming from v5 would never reach a branch placed at the end. - fs.existsSync was the wrong check. macOS is case-insensitive, so a miscased path resolves locally and 404s on github.com, and a file that exists in the working tree but is untracked is not on main either. The sweep now compares against git's index, which answers both, and degrades to an existence check when git is unavailable. Also makes an unrecognised owner/repo in a main-branch URL fail loudly rather than being silently treated as somebody else's fork, and rewrites the failure message to tell the next person what to do about it.
Code review of the first two commits found the guard's scope was the blind spot, not just a scope decision: the same restructure left six identical dead links in the Notion and Jira import templates users download to seed these very artifacts, so the 404 was propagating into their tooling. Sweeping only src/ institutionalized that. The sweep now walks git's index, which covers the whole tree and excludes node_modules and build/ for free. Widening it immediately exposed two flaws in the extractor: - These links live in CSV cells, and the pattern swallowed the following column into the path. Commas, angle brackets, fragments and query strings now terminate a URL rather than belong to it. - Flagging every main-branch link to any other repo was wrong — linking to another project is ordinary. It now flags only links to a repo *named* csf_profile under an unrecognised owner, which is the actual typo class, and leaves genuine references to other projects alone. Also splits the sweep out as sweepLinks() so its broken-link branch is exercised against a fixture. The previous polarity test asserted on fs.existsSync directly and would have passed even if that branch were inverted or deleted. Files opt out by content marker rather than by filename, so renaming this test no longer silently removes its own fixtures from the sweep. Correction to the first commit message: the guard covered 37 links, not 41. It now covers 45 across 1,098 swept files.
The link repair looked up replacements on a plain object literal, so an artifact whose link read 'toString' or '__proto__' resolved to an inherited member. The link field became a function or an object, and JSON.stringify then dropped it on the way into localStorage — silent field loss, reachable through CSV import, which takes the column raw. The lookup is now own-property-only with a string check on both sides, and the test table covers all seven inherited names plus a persist round trip. Reverting the guard fails those eight tests, so they catch the defect they describe rather than merely describing it. The guard's own git-unavailable fallback had the shape it exists to prevent: the case-drift and untracked-path tests opened with a bare return, and a jest test that returns before asserting passes. A checkout without a git index would have downgraded the sweep to an existence check with nothing in the output to say so. Those tests now live in a suite that is skipped loudly when git is missing and required outright on CI. Also replaces the per-link scan of the index with a precomputed directory set.
Narrowing the unknown-repo check to links naming a repo 'csf_profile' stopped it flagging genuine references to other projects, but it left a likelier typo invisible: our owner with a mangled repo name. The exact-slug path pattern skips it because the slug does not match, and the repo-name rule skipped it because 'csf-profile' reads as somebody else's project, so it would have shipped as a silent 404. A link is now suspect when exactly one half of the slug matches ours, which covers both directions and still leaves unrelated projects alone. Also reads the extension from the basename, so a dotted directory such as .github/CODEOWNERS no longer yields an extension of '.github/codeowners'. Same verdict by a different route today, but wrong for the stated reason. The measured link count is 45 across 1,098 swept files; the third commit message has been corrected to say so rather than the 53 I asserted without measuring.
… linking (#294) - Bank generator strips the catalog's GitHub-only '## Related' sections and rewrites remaining relative links to absolute GitHub blob URLs (shared src/utils/relatedSection.mjs); bank + comprehensive data regenerated - Only the 2026 Alma Comprehensive example ships: v14 migration removes the two legacy demo assessments (exact seeded IDs), findingsStore v5 drops their four FND-1..4 demo findings; defaultAssessmentsData.js and defaultFindingsData.js deleted - Pristine community attaches (modified:false, untailored) heal IN PLACE with the same transform — covers the comprehensive example itself, so user scores/notes inside it survive (no constant-replace) - New ControlSelector on the evaluation panel (FindingSelector pattern): dropdown from the Controls register, chips navigate to /controls?selected=<id>; stored as observation.linkedControls - findingsStore migrate converted to fall-through preserving v0/v1 keep-user-findings semantics; 426/426 jest, both drift guards green
…atalog-links Repoint links orphaned by the ASSESSMENT_CATALOG restructure (#287)
…-links-single-example Ship one example assessment, strip dead-link Related sections, add in-app Controls linking (#294)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )