|
531 | 531 | } |
532 | 532 | ] |
533 | 533 | }, |
| 534 | + "SocketSBOMScore": { |
| 535 | + "type": "object", |
| 536 | + "additionalProperties": { |
| 537 | + "type": "object", |
| 538 | + "additionalProperties": false, |
| 539 | + "description": "", |
| 540 | + "properties": { |
| 541 | + "value": { |
| 542 | + "type": "object", |
| 543 | + "additionalProperties": false, |
| 544 | + "properties": { |
| 545 | + "result": { |
| 546 | + "type": "number", |
| 547 | + "description": "Score from 0.0 to 1.0 for the scanned repository, computed from supply chain risk alerts using weighted exponential decay per direct dependency", |
| 548 | + "default": 0 |
| 549 | + }, |
| 550 | + "components": { |
| 551 | + "type": "object", |
| 552 | + "additionalProperties": { |
| 553 | + "type": "number", |
| 554 | + "description": "", |
| 555 | + "default": 0 |
| 556 | + }, |
| 557 | + "properties": {}, |
| 558 | + "description": "Components used to compute result of the formula" |
| 559 | + }, |
| 560 | + "formula": { |
| 561 | + "type": "string", |
| 562 | + "description": "Formula used to compute the supply chain security score", |
| 563 | + "default": "" |
| 564 | + } |
| 565 | + }, |
| 566 | + "required": [ |
| 567 | + "result" |
| 568 | + ] |
| 569 | + } |
| 570 | + }, |
| 571 | + "required": [ |
| 572 | + "value" |
| 573 | + ] |
| 574 | + }, |
| 575 | + "properties": {}, |
| 576 | + "description": "Mapping of supply chain risk alert types to their computed score contributions and formulas used for calculation. This allows for detailed breakdowns of how each alert type impacts the overall supply chain security score, with the ability to include custom formulas and components for each alert type." |
| 577 | + }, |
534 | 578 | "SocketDiffArtifact": { |
535 | 579 | "allOf": [ |
536 | 580 | { |
|
8481 | 8525 | } |
8482 | 8526 | } |
8483 | 8527 | }, |
| 8528 | + { |
| 8529 | + "type": "object", |
| 8530 | + "additionalProperties": false, |
| 8531 | + "properties": { |
| 8532 | + "type": { |
| 8533 | + "type": "string", |
| 8534 | + "enum": [ |
| 8535 | + "skillPreExecution" |
| 8536 | + ] |
| 8537 | + }, |
| 8538 | + "value": { |
| 8539 | + "allOf": [ |
| 8540 | + { |
| 8541 | + "$ref": "#/components/schemas/SocketIssueBasics" |
| 8542 | + }, |
| 8543 | + { |
| 8544 | + "type": "object", |
| 8545 | + "additionalProperties": false, |
| 8546 | + "properties": { |
| 8547 | + "description": { |
| 8548 | + "type": "string", |
| 8549 | + "description": "", |
| 8550 | + "default": "" |
| 8551 | + }, |
| 8552 | + "props": { |
| 8553 | + "type": "object", |
| 8554 | + "additionalProperties": false, |
| 8555 | + "description": "", |
| 8556 | + "properties": { |
| 8557 | + "notes": { |
| 8558 | + "type": "string", |
| 8559 | + "description": "", |
| 8560 | + "default": "" |
| 8561 | + }, |
| 8562 | + "confidence": { |
| 8563 | + "type": "number", |
| 8564 | + "description": "", |
| 8565 | + "default": 0 |
| 8566 | + }, |
| 8567 | + "severity": { |
| 8568 | + "type": "number", |
| 8569 | + "description": "", |
| 8570 | + "default": 0 |
| 8571 | + } |
| 8572 | + }, |
| 8573 | + "required": [ |
| 8574 | + "confidence", |
| 8575 | + "notes", |
| 8576 | + "severity" |
| 8577 | + ] |
| 8578 | + }, |
| 8579 | + "usage": { |
| 8580 | + "$ref": "#/components/schemas/SocketUsageRef" |
| 8581 | + } |
| 8582 | + }, |
| 8583 | + "required": [ |
| 8584 | + "description", |
| 8585 | + "props" |
| 8586 | + ] |
| 8587 | + } |
| 8588 | + ] |
| 8589 | + } |
| 8590 | + } |
| 8591 | + }, |
8484 | 8592 | { |
8485 | 8593 | "type": "object", |
8486 | 8594 | "additionalProperties": false, |
|
11826 | 11934 | "type": "boolean", |
11827 | 11935 | "default": false |
11828 | 11936 | } |
| 11937 | + }, |
| 11938 | + { |
| 11939 | + "name": "timeoutSec", |
| 11940 | + "in": "query", |
| 11941 | + "required": false, |
| 11942 | + "description": "Maximum time in seconds to wait for scan results. PURLs that have not completed processing when the timeout is reached will be returned as errors (when purlErrors is enabled). Omit for no timeout.", |
| 11943 | + "schema": { |
| 11944 | + "type": "integer", |
| 11945 | + "minimum": 1, |
| 11946 | + "maximum": 1200 |
| 11947 | + } |
11829 | 11948 | } |
11830 | 11949 | ], |
11831 | 11950 | "requestBody": { |
|
12981 | 13100 | "default": false |
12982 | 13101 | } |
12983 | 13102 | }, |
| 13103 | + { |
| 13104 | + "name": "include_scores", |
| 13105 | + "in": "query", |
| 13106 | + "required": true, |
| 13107 | + "description": "Include scores event in the response. include_scores_details implies this flag", |
| 13108 | + "schema": { |
| 13109 | + "type": "boolean", |
| 13110 | + "default": false |
| 13111 | + } |
| 13112 | + }, |
| 13113 | + { |
| 13114 | + "name": "include_scores_details", |
| 13115 | + "in": "query", |
| 13116 | + "required": false, |
| 13117 | + "description": "Control which score detail fields to include in the scores event. Set to \"true\" to include all fields, \"false\" to exclude all fields, or specify individual fields like \"components,formula\" to include only those fields.", |
| 13118 | + "schema": { |
| 13119 | + "oneOf": [ |
| 13120 | + { |
| 13121 | + "type": "boolean", |
| 13122 | + "default": false |
| 13123 | + }, |
| 13124 | + { |
| 13125 | + "type": "array", |
| 13126 | + "items": { |
| 13127 | + "type": "string", |
| 13128 | + "enum": [ |
| 13129 | + "components", |
| 13130 | + "formula" |
| 13131 | + ] |
| 13132 | + } |
| 13133 | + } |
| 13134 | + ], |
| 13135 | + "default": false |
| 13136 | + } |
| 13137 | + }, |
12984 | 13138 | { |
12985 | 13139 | "name": "include_license_details", |
12986 | 13140 | "in": "query", |
@@ -13020,11 +13174,34 @@ |
13020 | 13174 | "content": { |
13021 | 13175 | "application/x-ndjson": { |
13022 | 13176 | "schema": { |
13023 | | - "$ref": "#/components/schemas/SocketArtifact" |
| 13177 | + "anyOf": [ |
| 13178 | + { |
| 13179 | + "$ref": "#/components/schemas/SocketArtifact" |
| 13180 | + }, |
| 13181 | + { |
| 13182 | + "type": "object", |
| 13183 | + "additionalProperties": false, |
| 13184 | + "properties": { |
| 13185 | + "_type": { |
| 13186 | + "type": "string", |
| 13187 | + "enum": [ |
| 13188 | + "scores" |
| 13189 | + ] |
| 13190 | + }, |
| 13191 | + "value": { |
| 13192 | + "$ref": "#/components/schemas/SocketSBOMScore" |
| 13193 | + } |
| 13194 | + }, |
| 13195 | + "required": [ |
| 13196 | + "_type", |
| 13197 | + "value" |
| 13198 | + ] |
| 13199 | + } |
| 13200 | + ] |
13024 | 13201 | } |
13025 | 13202 | } |
13026 | 13203 | }, |
13027 | | - "description": "Socket issue lists and scores for all packages" |
| 13204 | + "description": "Socket issue lists and scores for all packages, followed by a final scores event" |
13028 | 13205 | }, |
13029 | 13206 | "202": { |
13030 | 13207 | "content": { |
|
21725 | 21902 | "action" |
21726 | 21903 | ] |
21727 | 21904 | }, |
| 21905 | + "skillPreExecution": { |
| 21906 | + "type": "object", |
| 21907 | + "additionalProperties": false, |
| 21908 | + "description": "", |
| 21909 | + "properties": { |
| 21910 | + "action": { |
| 21911 | + "type": "string", |
| 21912 | + "enum": [ |
| 21913 | + "defer", |
| 21914 | + "error", |
| 21915 | + "warn", |
| 21916 | + "monitor", |
| 21917 | + "ignore" |
| 21918 | + ], |
| 21919 | + "description": "The action to take for skillPreExecution issues." |
| 21920 | + } |
| 21921 | + }, |
| 21922 | + "required": [ |
| 21923 | + "action" |
| 21924 | + ] |
| 21925 | + }, |
21728 | 21926 | "skillPromptInjection": { |
21729 | 21927 | "type": "object", |
21730 | 21928 | "additionalProperties": false, |
|
24581 | 24779 | "action" |
24582 | 24780 | ] |
24583 | 24781 | }, |
| 24782 | + "skillPreExecution": { |
| 24783 | + "type": "object", |
| 24784 | + "additionalProperties": false, |
| 24785 | + "description": "", |
| 24786 | + "properties": { |
| 24787 | + "action": { |
| 24788 | + "type": "string", |
| 24789 | + "enum": [ |
| 24790 | + "defer", |
| 24791 | + "error", |
| 24792 | + "warn", |
| 24793 | + "monitor", |
| 24794 | + "ignore" |
| 24795 | + ], |
| 24796 | + "description": "The action to take for skillPreExecution issues." |
| 24797 | + } |
| 24798 | + }, |
| 24799 | + "required": [ |
| 24800 | + "action" |
| 24801 | + ] |
| 24802 | + }, |
24584 | 24803 | "skillPromptInjection": { |
24585 | 24804 | "type": "object", |
24586 | 24805 | "additionalProperties": false, |
|
27750 | 27969 | "action" |
27751 | 27970 | ] |
27752 | 27971 | }, |
| 27972 | + "skillPreExecution": { |
| 27973 | + "type": "object", |
| 27974 | + "additionalProperties": false, |
| 27975 | + "description": "", |
| 27976 | + "properties": { |
| 27977 | + "action": { |
| 27978 | + "type": "string", |
| 27979 | + "enum": [ |
| 27980 | + "defer", |
| 27981 | + "error", |
| 27982 | + "warn", |
| 27983 | + "monitor", |
| 27984 | + "ignore" |
| 27985 | + ], |
| 27986 | + "description": "The action to take for skillPreExecution issues." |
| 27987 | + } |
| 27988 | + }, |
| 27989 | + "required": [ |
| 27990 | + "action" |
| 27991 | + ] |
| 27992 | + }, |
27753 | 27993 | "skillPromptInjection": { |
27754 | 27994 | "type": "object", |
27755 | 27995 | "additionalProperties": false, |
|
30609 | 30849 | "action" |
30610 | 30850 | ] |
30611 | 30851 | }, |
| 30852 | + "skillPreExecution": { |
| 30853 | + "type": "object", |
| 30854 | + "additionalProperties": false, |
| 30855 | + "description": "", |
| 30856 | + "properties": { |
| 30857 | + "action": { |
| 30858 | + "type": "string", |
| 30859 | + "enum": [ |
| 30860 | + "defer", |
| 30861 | + "error", |
| 30862 | + "warn", |
| 30863 | + "monitor", |
| 30864 | + "ignore" |
| 30865 | + ], |
| 30866 | + "description": "The action to take for skillPreExecution issues." |
| 30867 | + } |
| 30868 | + }, |
| 30869 | + "required": [ |
| 30870 | + "action" |
| 30871 | + ] |
| 30872 | + }, |
30612 | 30873 | "skillPromptInjection": { |
30613 | 30874 | "type": "object", |
30614 | 30875 | "additionalProperties": false, |
|
33421 | 33682 | "action" |
33422 | 33683 | ] |
33423 | 33684 | }, |
| 33685 | + "skillPreExecution": { |
| 33686 | + "type": "object", |
| 33687 | + "additionalProperties": false, |
| 33688 | + "description": "", |
| 33689 | + "properties": { |
| 33690 | + "action": { |
| 33691 | + "type": "string", |
| 33692 | + "enum": [ |
| 33693 | + "defer", |
| 33694 | + "error", |
| 33695 | + "warn", |
| 33696 | + "monitor", |
| 33697 | + "ignore" |
| 33698 | + ], |
| 33699 | + "description": "The action to take for skillPreExecution issues." |
| 33700 | + } |
| 33701 | + }, |
| 33702 | + "required": [ |
| 33703 | + "action" |
| 33704 | + ] |
| 33705 | + }, |
33424 | 33706 | "skillPromptInjection": { |
33425 | 33707 | "type": "object", |
33426 | 33708 | "additionalProperties": false, |
|
40664 | 40946 | "type": "boolean", |
40665 | 40947 | "default": false |
40666 | 40948 | } |
| 40949 | + }, |
| 40950 | + { |
| 40951 | + "name": "timeoutSec", |
| 40952 | + "in": "query", |
| 40953 | + "required": false, |
| 40954 | + "description": "Maximum time in seconds to wait for scan results. PURLs that have not completed processing when the timeout is reached will be returned as errors (when purlErrors is enabled). Omit for no timeout, unless a default timeout is configured for the organization.", |
| 40955 | + "schema": { |
| 40956 | + "type": "integer", |
| 40957 | + "minimum": 1, |
| 40958 | + "maximum": 1200 |
| 40959 | + } |
40667 | 40960 | } |
40668 | 40961 | ], |
40669 | 40962 | "requestBody": { |
|
40740 | 41033 | "name": "repo_slug", |
40741 | 41034 | "in": "query", |
40742 | 41035 | "required": false, |
40743 | | - "description": "The slug of the repository to fetch fixes for. Computes fixes based on the latest scan on the default branch", |
| 41036 | + "description": "The slug of the repository to fetch fixes for (e.g. \"my-repo\" or \"my-org/my-repo\"). Use the full org/repo path to disambiguate when multiple GitHub orgs share the same repo name. Computes fixes based on the latest scan on the default branch", |
40744 | 41037 | "schema": { |
40745 | 41038 | "type": "string" |
40746 | 41039 | } |
|
0 commit comments