autoremediator 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/api/change-request/index.d.ts +2 -1
- package/dist/api/change-request/index.d.ts.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/patches/index.d.ts +1 -0
- package/dist/api/patches/index.d.ts.map +1 -1
- package/dist/api/patches/reconcile.d.ts +7 -0
- package/dist/api/patches/reconcile.d.ts.map +1 -0
- package/dist/api/patches/reconcile.test.d.ts +2 -0
- package/dist/api/patches/reconcile.test.d.ts.map +1 -0
- package/dist/api/remediate/validators.d.ts +3 -0
- package/dist/api/remediate/validators.d.ts.map +1 -1
- package/dist/{chunk-U4LIJIGD.js → chunk-FXOUJDQ3.js} +1712 -856
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/runners.d.ts +5 -0
- package/dist/cli/runners.d.ts.map +1 -1
- package/dist/cli/triage.d.ts +7 -0
- package/dist/cli/triage.d.ts.map +1 -0
- package/dist/cli/types.d.ts +2 -0
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli.js +220 -3
- package/dist/index.js +1707 -852
- package/dist/index.js.map +1 -1
- package/dist/intelligence/sources/github-advisory.d.ts.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/openapi/server.js +1 -1
- package/dist/platform/package-manager/index.d.ts +1 -0
- package/dist/platform/package-manager/index.d.ts.map +1 -1
- package/dist/platform/supply-chain.d.ts +10 -0
- package/dist/platform/supply-chain.d.ts.map +1 -0
- package/dist/platform/supply-chain.test.d.ts +2 -0
- package/dist/platform/supply-chain.test.d.ts.map +1 -0
- package/dist/platform/types.d.ts +38 -4
- package/dist/platform/types.d.ts.map +1 -1
- package/dist/platform/workspace.d.ts +28 -0
- package/dist/platform/workspace.d.ts.map +1 -0
- package/dist/platform/workspace.test.d.ts +2 -0
- package/dist/platform/workspace.test.d.ts.map +1 -0
- package/dist/remediation/local/options.d.ts.map +1 -1
- package/dist/remediation/local/primary-strategy.d.ts +3 -1
- package/dist/remediation/local/primary-strategy.d.ts.map +1 -1
- package/dist/remediation/strategies/patch-synthesis-prompt.d.ts.map +1 -1
- package/dist/remediation/tools/apply-patch-file/index.d.ts +1 -0
- package/dist/remediation/tools/apply-patch-file/index.d.ts.map +1 -1
- package/dist/remediation/tools/apply-version-bump.d.ts +1 -0
- package/dist/remediation/tools/apply-version-bump.d.ts.map +1 -1
- package/dist/remediation/tools/check-inventory.d.ts.map +1 -1
- package/dist/remediation/tools/check-reachability.d.ts +6 -1
- package/dist/remediation/tools/check-reachability.d.ts.map +1 -1
- package/dist/remediation/tools/generate-patch/helpers.d.ts +1 -0
- package/dist/remediation/tools/generate-patch/helpers.d.ts.map +1 -1
- package/dist/remediation/tools/generate-patch/index.d.ts +1 -0
- package/dist/remediation/tools/generate-patch/index.d.ts.map +1 -1
- package/dist/scanner/adapters/npm-audit.d.ts.map +1 -1
- package/dist/scanner/adapters/yarn-audit.d.ts.map +1 -1
- package/dist/scanner/delta-scan.d.ts.map +1 -1
- package/dist/scanner/lockfile-diff.d.ts +10 -0
- package/dist/scanner/lockfile-diff.d.ts.map +1 -0
- package/dist/scanner/lockfile-diff.test.d.ts +2 -0
- package/dist/scanner/lockfile-diff.test.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,8 @@ Autoremediator selects the safest applicable fix strategy for each vulnerability
|
|
|
43
43
|
|
|
44
44
|
- **Direct version upgrade** — the preferred path when a safe fixed version exists in the direct dependency graph
|
|
45
45
|
- **Transitive override** — applied when exposure is in a transitive dependency and a direct upgrade is not feasible
|
|
46
|
-
- **Controlled patch generation** — a confidence-scored fallback when no safe fixed version exists; produces auditable patch artifacts tracked through their full lifecycle
|
|
46
|
+
- **Controlled patch generation** — a confidence-scored fallback when no safe fixed version exists; produces auditable patch artifacts tracked through their full lifecycle with synthesized reproduction tests
|
|
47
|
+
- **Upstream patch reconciliation** — detects when upstream package releases supersede local patch files and safely retires them (`patches reconcile`)
|
|
47
48
|
|
|
48
49
|
Unresolved findings are never silently dropped. Each one is classified with an explicit reason and treated as an escalation input for downstream security workflows.
|
|
49
50
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ChangeRequestOptions, ChangeRequestResult, RemediationReport } from "../../platform/types.js";
|
|
1
|
+
import type { ChangeRequestGrouping, ChangeRequestOptions, ChangeRequestResult, RemediationReport } from "../../platform/types.js";
|
|
2
|
+
export declare function groupReports(reports: RemediationReport[], grouping: ChangeRequestGrouping): RemediationReport[][];
|
|
2
3
|
export declare function createChangeRequestsForReports(params: {
|
|
3
4
|
cwd: string;
|
|
4
5
|
options: ChangeRequestOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/change-request/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/change-request/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAsDjC,wBAAgB,YAAY,CAC1B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,QAAQ,EAAE,qBAAqB,GAC9B,iBAAiB,EAAE,EAAE,CAgDvB;AA8FD,wBAAsB,8BAA8B,CAAC,MAAM,EAAE;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA+GjC"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* import { remediate } from 'autoremediator';
|
|
6
6
|
* const report = await remediate('CVE-2021-23337', { cwd: '/my/project' });
|
|
7
7
|
*/
|
|
8
|
-
export type { CorrelationContext, CveSeverity, LlmUsageMetrics, ModelPersonality, RemediationConstraints, ProvenanceContext, ProgressEvent, ProviderSafetyProfile, RemediateOptions, RemediationReport, ResultSimulation, CveDetails, AffectedPackage, InventoryPackage, VulnerablePackage, PatchResult, PatchStrategy, PatchStrategyCounts, DependencyScope, DependencyScopeCounts, PatchArtifact, PatchArtifactInspection, PatchArtifactQueryOptions, PatchArtifactSummary, PatchArtifactValidationReport, PatchMode, PatchRiskLevel, PatchConfidenceThresholds, UnresolvedReason, UnresolvedReasonCounts, EscalationAction, EscalationGraph, EscalationCounts, Disposition, DispositionPolicy, DispositionSignals, DispositionCounts, PatchValidationPhase, PatchValidationPhaseName, PortfolioReport, PortfolioTarget, PortfolioTargetResult, OutdatedPackage, UpdateOutdatedOptions, UpdateOutdatedReport, ExploitSignalOverridePolicy, VexJustification, VexSuppression, SlaPolicy, SlaBreach, SlaBreachEntry, SlaBreachSummary, ReachabilityAssessment, ReachabilityEvidence, SbomEntry, SbomStatus, SimulationMutation, SimulationMutationTarget, SimulationRebuttalCode, SimulationRebuttalFinding, SimulationSummary, CheckReachabilityOptions, EvaluatePackageOptions, PackageEvaluationReport, VulnerabilityEvaluationEntry, DeltaDependencyChange, DeltaFinding, DeltaScanOptions, DeltaScanReport, } from "../platform/types.js";
|
|
8
|
+
export type { CorrelationContext, CveSeverity, LlmUsageMetrics, ModelPersonality, RemediationConstraints, ProvenanceContext, ProgressEvent, ProviderSafetyProfile, RemediateOptions, RemediationReport, ResultSimulation, CveDetails, AffectedPackage, InventoryPackage, VulnerablePackage, PatchResult, PatchStrategy, PatchStrategyCounts, DependencyScope, DependencyScopeCounts, PatchArtifact, PatchArtifactInspection, PatchArtifactQueryOptions, PatchArtifactSummary, PatchArtifactValidationReport, PatchReconcileOptions, PatchReconcileResult, PatchReconcileReport, PatchMode, PatchRiskLevel, PatchConfidenceThresholds, UnresolvedReason, UnresolvedReasonCounts, EscalationAction, EscalationGraph, EscalationCounts, Disposition, DispositionPolicy, DispositionSignals, DispositionCounts, PatchValidationPhase, PatchValidationPhaseName, PortfolioReport, PortfolioTarget, PortfolioTargetResult, OutdatedPackage, UpdateOutdatedOptions, UpdateOutdatedReport, ExploitSignalOverridePolicy, VexJustification, VexSuppression, SlaPolicy, SlaBreach, SlaBreachEntry, SlaBreachSummary, ReachabilityAssessment, ReachabilityEvidence, SbomEntry, SbomStatus, SimulationMutation, SimulationMutationTarget, SimulationRebuttalCode, SimulationRebuttalFinding, SimulationSummary, CheckReachabilityOptions, EvaluatePackageOptions, PackageEvaluationReport, VulnerabilityEvaluationEntry, DeltaDependencyChange, DeltaFinding, DeltaScanOptions, DeltaScanReport, } from "../platform/types.js";
|
|
9
9
|
export type { ScanInputFormat } from "../scanner/index.js";
|
|
10
10
|
export type { ScanOptions, ScanReport, CiSummary } from "./contracts.js";
|
|
11
11
|
export { PACKAGE_MANAGER_VALUES, LLM_PROVIDER_VALUES, PROVENANCE_SOURCE_VALUES, OPTION_DESCRIPTIONS, createConstraintSchemaProperties, createRemediateOptionSchemaProperties, createScanOptionSchemaProperties, createScanReportSchemaProperties, createUpdateOutdatedOptionSchemaProperties, } from "./options-schema.js";
|
|
12
12
|
export { toCiSummary, ciExitCode, buildSlaBreachSummary, buildStrategyCounts, buildDependencyScopeCounts, } from "./reporting.js";
|
|
13
13
|
export { toSarifOutput, type SarifOutput } from "./sarif.js";
|
|
14
14
|
export { toCycloneDxVex, type CycloneDxVexDocument, type CycloneDxVexVulnerability, type CycloneDxVexVulnerabilityAnalysis, type ToCycloneDxVexOptions, } from "./vex/index.js";
|
|
15
|
-
export { inspectPatchArtifact, listPatchArtifacts, validatePatchArtifact, } from "./patches/index.js";
|
|
15
|
+
export { inspectPatchArtifact, listPatchArtifacts, validatePatchArtifact, reconcilePatchArtifacts, } from "./patches/index.js";
|
|
16
16
|
export { remediatePortfolio } from "./portfolio/index.js";
|
|
17
17
|
export { remediate, planRemediation } from "./remediate/index.js";
|
|
18
18
|
export { remediateFromScan } from "./remediate-from-scan/index.js";
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,SAAS,EACT,cAAc,EACd,yBAAyB,EACzB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,gCAAgC,EAChC,qCAAqC,EACrC,gCAAgC,EAChC,gCAAgC,EAChC,0CAA0C,GAC3C,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,EACtC,KAAK,qBAAqB,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,cAAc,EACd,yBAAyB,EACzB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WA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AM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,GAC9B,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/patches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/patches/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PatchReconcileOptions, PatchReconcileReport } from "../../platform/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Reconciles active patch artifacts in patchesDir against upstream registries.
|
|
4
|
+
* If safe upstream releases have been published, the patches can be retired and packages upgraded.
|
|
5
|
+
*/
|
|
6
|
+
export declare function reconcilePatchArtifacts(options?: PatchReconcileOptions): Promise<PatchReconcileReport>;
|
|
7
|
+
//# sourceMappingURL=reconcile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../src/api/patches/reconcile.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EAErB,MAAM,yBAAyB,CAAC;AAGjC;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAqK/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile.test.d.ts","sourceRoot":"","sources":["../../../src/api/patches/reconcile.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/api/remediate/validators.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAMpD"}
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../src/api/remediate/validators.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAyB,CAAC;AACnD,eAAO,MAAM,aAAa,QAAgD,CAAC;AAE3E,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAMpD"}
|