Issue 314: Provide a dedicated flow for risks transferred from a dependency - #393
Open
lalit-t0251068 wants to merge 8 commits into
Open
Issue 314: Provide a dedicated flow for risks transferred from a dependency#393lalit-t0251068 wants to merge 8 commits into
lalit-t0251068 wants to merge 8 commits into
Conversation
Introduces Claude Code configuration for AI-assisted development on ISRA. CLAUDE.md - Documents monorepo structure (lib/ vs app/), IPC architecture, ISO 27005 data model, validation pattern, file formats, testing, linting, and Electron security constraints — giving Claude full project context. .claude/settings.json (hooks) - PostToolUse: auto-runs ESLint --fix on any lib/**/*.js file after an edit - PreToolUse: blocks direct edits to package-lock.json .claude/agents/security-reviewer.md - Electron security specialist agent: reviews against Electron hardening rules, OWASP Desktop App Top 10, IPC input sanitization, XXE/XSS risks in xml-json/, and file path traversal in data-load/data-store/ .claude/agents/test-writer.md - Jest test generator: writes unit and integration tests for lib/src/ following existing patterns (AJV validation, round-trip load/save, handler mocking) .claude/skills/project-conventions/SKILL.md - Loads ISRA-specific conventions (data model hierarchy, IPC pattern, validation approach, URL scheme allowlist) before code generation .claude/skills/run-tests/SKILL.md - One-command skill that runs the full Jest suite with coverage for lib/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Excludes files that waste context without helping Claude understand the code: - node_modules/, dist/, coverage/ — generated/installed, not source - lib/doc/APIdocumentation/ — generated JSDoc output - app/src/asset/ images — binary files Claude cannot use - lib/test/integration/fixtures/ — large JSON/XML test data (read on demand) - doc/*.xlsx — binary Office document - package-lock.json files — auto-generated, never hand-edited Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add .gemini/skills/codebase-simplification-analysis.skill definition - Add codebase-simplification-analysis.zip packaged skill - Update SKILL.md configurations
…t names - Constrain select elements globally to max-width: 100% with ellipsis to prevent overflow. - Enable variableHeight on the vulnerabilityName column in render-vulnerabilities.js. - Wrap vulnerabilityName and supportingAssetName table column values in text-wrap spans. - Add overflow-renderer-dom.test.js to verify layout constraints.
…ndency - Introduce isTransferredFromDependency and dependencyOrigin attributes to Risk model and json-schema. - Bypass default threat/asset likelihood and impact evaluations when flagged. - Set inherent, mitigated, and residual risk scores directly to the user-entered score. - Map residualRiskLevel directly from the user score. - Render simplified UI fields (comment for origin and direct score) on the Risks tab. - Hide standard threat description, evaluation, and mitigation panels for transferred risks. - Implement unit and integration tests covering all requirements.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#314 a dedicated flow for risks transferred from a dependency
📝 Description & Context
Currently, the ISRA Risk Assessment Tool requires a complete, complex evaluation process for all risks. While this is necessary for core project-level risk factors, it creates a heavy administrative burden when trying to document simple, transferred risks that originate from third-party dependencies or libraries (e.g., inheriting a CVE or minor security vulnerability from a dependency). Defining these requires importing/mapping numerous individual primary and supporting assets, detailed threat agents, verbs, likelihood metrics, and mitigation lists.
This Merge Request introduces a simplified, dedicated flow specifically designed for risks that are transferred from a dependency.
By checking the new "Risk transferred from a dependency" checkbox, the complex multi-step evaluation sections are bypassed, and users are presented with a streamlined form requiring only:
riskName)dependencyOrigin)residualRiskLevelautomatically)🚀 Key Changes
📁 Backend & Domain Layer (
lib/)lib/src/model/schema/json-schema.js):isTransferredFromDependency(boolean, default:false) anddependencyOrigin(string, default:"") properties to Risk schemas.lib/src/model/classes/Risk/validation.js):isTransferredFromDependencyandisDependencyOrigintype check validation helpers.lib/src/model/classes/Risk/risk.js):get properties()) to conditionally serializeisTransferredFromDependencyanddependencyOriginonly when the risk is flagged as transferred (this maintains perfect 100% backward compatibility with all pre-existing integration test suites that assert strict deep equality on default properties).lib/src/api/Risk/handler-event.js):isTransferredFromDependency === true.updateRiskNameevent handler to interceptisTransferredFromDependency,dependencyOrigin, andtransferredScore. Direct score changes setinherentRiskScore,mitigatedRiskScore, andresidualRiskScoredirectly and deriveresidualRiskLevelusing standard ranges (e.g.12->High).🖥️ Frontend & UI (
app/)lib/src/api/Risk/render-risks.js):app/src/tabs/Risks/renderer.js):toggleTransferredRiskSections(isTransferred)to immediately collapse or display domestic forms.isTransferredFromDependency,dependencyOrigin, andtransferredScoreto immediately sync inputs back to the backend.🧪 Verification & Testing
Our full test suite has been updated, extended, and runs successfully with 100% PASS rate!
📋 Mapped Test Cases (
transferred-risk.test.js)We added a comprehensive, in-tree test suite verifying all behaviors under
lib/test/unit/risk/transferred-risk.test.js:🔒 Security & Backward Compatibility
contextIsolation: trueornodeIntegration: false)..srafiles will load correctly, default properties are cleanly omitted when not in use, and schema defaults populate seamlessly.🛠️ Rollout Plan
Issue-314intomain.npm run dist.