Skip to content

Commit 1e8c2da

Browse files
committed
fix(openapi): sync with openapi definition
1 parent 7a22968 commit 1e8c2da

File tree

2 files changed

+386
-6
lines changed

2 files changed

+386
-6
lines changed

openapi.json

Lines changed: 296 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,50 @@
531531
}
532532
]
533533
},
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+
},
534578
"SocketDiffArtifact": {
535579
"allOf": [
536580
{
@@ -8481,6 +8525,70 @@
84818525
}
84828526
}
84838527
},
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+
},
84848592
{
84858593
"type": "object",
84868594
"additionalProperties": false,
@@ -11826,6 +11934,17 @@
1182611934
"type": "boolean",
1182711935
"default": false
1182811936
}
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+
}
1182911948
}
1183011949
],
1183111950
"requestBody": {
@@ -12981,6 +13100,41 @@
1298113100
"default": false
1298213101
}
1298313102
},
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+
},
1298413138
{
1298513139
"name": "include_license_details",
1298613140
"in": "query",
@@ -13020,11 +13174,34 @@
1302013174
"content": {
1302113175
"application/x-ndjson": {
1302213176
"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+
]
1302413201
}
1302513202
}
1302613203
},
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"
1302813205
},
1302913206
"202": {
1303013207
"content": {
@@ -21725,6 +21902,27 @@
2172521902
"action"
2172621903
]
2172721904
},
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+
},
2172821926
"skillPromptInjection": {
2172921927
"type": "object",
2173021928
"additionalProperties": false,
@@ -24581,6 +24779,27 @@
2458124779
"action"
2458224780
]
2458324781
},
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+
},
2458424803
"skillPromptInjection": {
2458524804
"type": "object",
2458624805
"additionalProperties": false,
@@ -27750,6 +27969,27 @@
2775027969
"action"
2775127970
]
2775227971
},
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+
},
2775327993
"skillPromptInjection": {
2775427994
"type": "object",
2775527995
"additionalProperties": false,
@@ -30609,6 +30849,27 @@
3060930849
"action"
3061030850
]
3061130851
},
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+
},
3061230873
"skillPromptInjection": {
3061330874
"type": "object",
3061430875
"additionalProperties": false,
@@ -33421,6 +33682,27 @@
3342133682
"action"
3342233683
]
3342333684
},
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+
},
3342433706
"skillPromptInjection": {
3342533707
"type": "object",
3342633708
"additionalProperties": false,
@@ -40664,6 +40946,17 @@
4066440946
"type": "boolean",
4066540947
"default": false
4066640948
}
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+
}
4066740960
}
4066840961
],
4066940962
"requestBody": {
@@ -40740,7 +41033,7 @@
4074041033
"name": "repo_slug",
4074141034
"in": "query",
4074241035
"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",
4074441037
"schema": {
4074541038
"type": "string"
4074641039
}

0 commit comments

Comments
 (0)