circle-ir 3.129.0 → 3.131.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/dist/analysis/passes/language-sources-pass.d.ts +61 -0
- package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +623 -0
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/browser/circle-ir.js +404 -0
- package/package.json +1 -1
|
@@ -197,4 +197,65 @@ export declare function findGoPatternFindings(code: string, file: string): SastF
|
|
|
197
197
|
* `noent: false`; only the explicit-true form is unsafe.
|
|
198
198
|
*/
|
|
199
199
|
export declare function findJsPatternFindings(code: string, file: string): SastFinding[];
|
|
200
|
+
/**
|
|
201
|
+
* Go xss — `fmt.Fprint(f|ln)?(w, ...)` writing tainted data directly to an
|
|
202
|
+
* `http.ResponseWriter`. Two-pass:
|
|
203
|
+
*
|
|
204
|
+
* 1. Discover ResponseWriter parameter names by scanning function
|
|
205
|
+
* signatures `(<name> http.ResponseWriter, ...)`.
|
|
206
|
+
* 2. For every `fmt.Fprint(f|ln)?(<name>, <format>, <args...>)` whose
|
|
207
|
+
* first argument matches a discovered name, emit xss UNLESS one of
|
|
208
|
+
* the args is wrapped in a recognized HTML escaper
|
|
209
|
+
* (`html.EscapeString` / `template.HTMLEscapeString` /
|
|
210
|
+
* `template.HTMLEscaper`).
|
|
211
|
+
*/
|
|
212
|
+
export declare function findGoXssFindings(code: string, file: string): SastFinding[];
|
|
213
|
+
/**
|
|
214
|
+
* Java xss — `<recv>.getWriter().{print,println,write,printf,format,append}
|
|
215
|
+
* (<arg>)` chained call where `<recv>` is typed `HttpServletResponse`.
|
|
216
|
+
* The receiver-chain form bypasses the configured `PrintWriter.print`
|
|
217
|
+
* sink because the engine doesn't yet trace `HttpServletResponse
|
|
218
|
+
* .getWriter()` → `PrintWriter` type resolution.
|
|
219
|
+
*
|
|
220
|
+
* Conservative: only fires when the receiver token matches a parameter
|
|
221
|
+
* named with the `HttpServletResponse` type AND no recognized HTML
|
|
222
|
+
* encoder wraps the argument.
|
|
223
|
+
*/
|
|
224
|
+
export declare function findJavaResponseWriterXssFindings(code: string, file: string): SastFinding[];
|
|
225
|
+
/**
|
|
226
|
+
* Vue xss — `template: '<...v-html="<var>"...>'` directive binding to a
|
|
227
|
+
* variable that is sourced from a tainted location (URLSearchParams,
|
|
228
|
+
* location.search/hash, route.query/params, fetch, etc.).
|
|
229
|
+
*
|
|
230
|
+
* Conservative: when the bound variable is a literal initializer
|
|
231
|
+
* (`<var>: 'static'`) or sourced from a non-recognized location, no
|
|
232
|
+
* finding is emitted.
|
|
233
|
+
*/
|
|
234
|
+
export declare function findJsVueVHtmlXssFindings(code: string, file: string): SastFinding[];
|
|
235
|
+
/**
|
|
236
|
+
* Angular xss — `<recv>.bypassSecurityTrust(Html|Script|Url|ResourceUrl|
|
|
237
|
+
* Style)(<arg>)` where `<recv>` is typed `DomSanitizer`. Skip when
|
|
238
|
+
* `<arg>` is a string literal (intentional safe-by-author escape hatch).
|
|
239
|
+
*/
|
|
240
|
+
export declare function findTsAngularBypassXssFindings(code: string, file: string): SastFinding[];
|
|
241
|
+
/**
|
|
242
|
+
* Python Flask xss — route function returning HTML built from a
|
|
243
|
+
* `request.<args|form|values|files>.get(...)` value via string concat,
|
|
244
|
+
* f-string, %, or .format(). Bypasses the engine's flow construction
|
|
245
|
+
* gap for these string ops.
|
|
246
|
+
*
|
|
247
|
+
* Conservative: requires a Flask-style route decorator (`@<x>.route(`)
|
|
248
|
+
* above the function; skip when the variable is escape()-wrapped.
|
|
249
|
+
*/
|
|
250
|
+
export declare function findPythonFlaskStringConcatXssFindings(code: string, file: string): SastFinding[];
|
|
251
|
+
/**
|
|
252
|
+
* Python Jinja2 Markup-bypass xss — `Markup(<var>)` where `<var>` is
|
|
253
|
+
* request-sourced, then passed into a `<X>.render(...)` call. The
|
|
254
|
+
* `Markup` wrap deliberately disables Jinja autoescape for the value.
|
|
255
|
+
*
|
|
256
|
+
* Namespace-scoped alias tracking (Sprint 74 lesson): only treats
|
|
257
|
+
* `Markup` as dangerous when imported from `markupsafe` or `flask`,
|
|
258
|
+
* and only when no user-defined `class Markup` shadows the import.
|
|
259
|
+
*/
|
|
260
|
+
export declare function findPythonJinjaMarkupXssFindings(code: string, file: string): SastFinding[];
|
|
200
261
|
//# sourceMappingURL=language-sources-pass.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"language-sources-pass.d.ts","sourceRoot":"","sources":["../../../src/analysis/passes/language-sources-pass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAwB,WAAW,EAAO,MAAM,sBAAsB,CAAC;AAC3H,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAqB9E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0C/B,CAAC;AAiCF,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,eAAe,EAAE,SAAS,EAAE,CAAC;IAC7B;;;;OAIG;IACH,oBAAoB,EAAE,cAAc,EAAE,CAAC;IACvC;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAMD,qBAAa,mBAAoB,YAAW,YAAY,CAAC,qBAAqB,CAAC;IAC7E,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,QAAQ,EAAG,UAAU,CAAU;IAExC,GAAG,CAAC,GAAG,EAAE,WAAW,GAAG,qBAAqB;
|
|
1
|
+
{"version":3,"file":"language-sources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