Skip to content

Commit 70891c0

Browse files
feat(security): add typed security alert outputs (#3387)
* feat(security): add typed alert outputs Add typed protocol-gated outputs for code quality, code and secret scanning, Dependabot, and security advisories while preserving existing text responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(security): preserve compatibility with compact typed outputs Keep advertised input defaults while disabling runtime default injection for security filters. Normalize null CWE filters, compact findings, and verify modern wire outputs alongside exact legacy formatting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 26bf4c4 commit 70891c0

24 files changed

Lines changed: 3052 additions & 388 deletions

‎pkg/github/__toolsnaps__/get_code_quality_finding.snap‎

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,136 @@
2727
],
2828
"type": "object"
2929
},
30-
"name": "get_code_quality_finding"
30+
"name": "get_code_quality_finding",
31+
"outputSchema": {
32+
"additionalProperties": false,
33+
"properties": {
34+
"created_at": {
35+
"description": "Finding creation time (RFC 3339).",
36+
"type": [
37+
"null",
38+
"string"
39+
]
40+
},
41+
"location": {
42+
"additionalProperties": false,
43+
"properties": {
44+
"end_column": {
45+
"type": [
46+
"null",
47+
"integer"
48+
]
49+
},
50+
"end_line": {
51+
"type": [
52+
"null",
53+
"integer"
54+
]
55+
},
56+
"path": {
57+
"type": [
58+
"null",
59+
"string"
60+
]
61+
},
62+
"start_column": {
63+
"type": [
64+
"null",
65+
"integer"
66+
]
67+
},
68+
"start_line": {
69+
"type": [
70+
"null",
71+
"integer"
72+
]
73+
}
74+
},
75+
"type": [
76+
"null",
77+
"object"
78+
]
79+
},
80+
"message": {
81+
"additionalProperties": false,
82+
"properties": {
83+
"markdown": {
84+
"type": "string"
85+
},
86+
"text": {
87+
"type": "string"
88+
}
89+
},
90+
"required": [
91+
"text",
92+
"markdown"
93+
],
94+
"type": [
95+
"null",
96+
"object"
97+
]
98+
},
99+
"number": {
100+
"type": [
101+
"null",
102+
"integer"
103+
]
104+
},
105+
"rule": {
106+
"additionalProperties": false,
107+
"properties": {
108+
"category": {
109+
"type": [
110+
"null",
111+
"string"
112+
]
113+
},
114+
"description": {
115+
"type": [
116+
"null",
117+
"string"
118+
]
119+
},
120+
"help": {
121+
"type": [
122+
"null",
123+
"string"
124+
]
125+
},
126+
"id": {
127+
"type": [
128+
"null",
129+
"string"
130+
]
131+
},
132+
"severity": {
133+
"type": [
134+
"null",
135+
"string"
136+
]
137+
},
138+
"title": {
139+
"type": [
140+
"null",
141+
"string"
142+
]
143+
}
144+
},
145+
"type": [
146+
"null",
147+
"object"
148+
]
149+
},
150+
"state": {
151+
"type": [
152+
"null",
153+
"string"
154+
]
155+
}
156+
},
157+
"type": [
158+
"null",
159+
"object"
160+
]
161+
}
31162
}

‎pkg/github/__toolsnaps__/get_code_scanning_alert.snap‎

Lines changed: 164 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,168 @@
2727
],
2828
"type": "object"
2929
},
30-
"name": "get_code_scanning_alert"
30+
"name": "get_code_scanning_alert",
31+
"outputSchema": {
32+
"additionalProperties": false,
33+
"properties": {
34+
"dismissed_comment": {
35+
"type": [
36+
"null",
37+
"string"
38+
]
39+
},
40+
"dismissed_reason": {
41+
"type": [
42+
"null",
43+
"string"
44+
]
45+
},
46+
"html_url": {
47+
"type": [
48+
"null",
49+
"string"
50+
]
51+
},
52+
"most_recent_instance": {
53+
"additionalProperties": false,
54+
"properties": {
55+
"commit_sha": {
56+
"type": [
57+
"null",
58+
"string"
59+
]
60+
},
61+
"html_url": {
62+
"type": [
63+
"null",
64+
"string"
65+
]
66+
},
67+
"location": {
68+
"additionalProperties": false,
69+
"properties": {
70+
"end_column": {
71+
"type": [
72+
"null",
73+
"integer"
74+
]
75+
},
76+
"end_line": {
77+
"type": [
78+
"null",
79+
"integer"
80+
]
81+
},
82+
"path": {
83+
"type": [
84+
"null",
85+
"string"
86+
]
87+
},
88+
"start_column": {
89+
"type": [
90+
"null",
91+
"integer"
92+
]
93+
},
94+
"start_line": {
95+
"type": [
96+
"null",
97+
"integer"
98+
]
99+
}
100+
},
101+
"type": [
102+
"null",
103+
"object"
104+
]
105+
},
106+
"message": {
107+
"type": [
108+
"null",
109+
"string"
110+
]
111+
},
112+
"ref": {
113+
"type": [
114+
"null",
115+
"string"
116+
]
117+
},
118+
"state": {
119+
"type": [
120+
"null",
121+
"string"
122+
]
123+
}
124+
},
125+
"type": [
126+
"null",
127+
"object"
128+
]
129+
},
130+
"number": {
131+
"type": [
132+
"null",
133+
"integer"
134+
]
135+
},
136+
"rule": {
137+
"additionalProperties": false,
138+
"properties": {
139+
"description": {
140+
"type": [
141+
"null",
142+
"string"
143+
]
144+
},
145+
"help": {
146+
"type": [
147+
"null",
148+
"string"
149+
]
150+
},
151+
"id": {
152+
"type": [
153+
"null",
154+
"string"
155+
]
156+
},
157+
"name": {
158+
"type": [
159+
"null",
160+
"string"
161+
]
162+
},
163+
"security_severity_level": {
164+
"description": "Security impact level, distinct from rule diagnostic severity.",
165+
"type": [
166+
"null",
167+
"string"
168+
]
169+
},
170+
"severity": {
171+
"type": [
172+
"null",
173+
"string"
174+
]
175+
}
176+
},
177+
"type": [
178+
"null",
179+
"object"
180+
]
181+
},
182+
"state": {
183+
"type": [
184+
"null",
185+
"string"
186+
]
187+
}
188+
},
189+
"type": [
190+
"null",
191+
"object"
192+
]
193+
}
31194
}

0 commit comments

Comments
 (0)