You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`data`|`str|list|dict`| The Python code to be parsed. |
115
+
|`ipython_mode`|`bool`| If set to <span class='boolean-value-true'>TRUE</span>, the code will be parsed in IPython mode. This is useful for parsing code that uses IPython-specific features or syntax. |
|`.imports`|`list[str]`| This field contains a list of imported modules in the provided code. It is useful for identifying which libraries or modules are being used in the code. |
130
+
|`.builtins`|`list[str]`| A list of built-in functions used in the provided code. |
131
+
|`.syntax_error`|`bool`| A boolean flag indicating whether the provided code has syntax errors. |
132
+
|`.syntax_error_exception`|`str|None`| A string containing the exception message if a syntax error occurred while parsing the provided code. |
133
+
|`.function_calls`|`set[str]`| A set of function call identifier names in the provided code. |
134
+
109
135
## Static Code Analysis
110
136
111
137
Static code analysis allows for powerful pattern-based detection of vulnerabilities and insecure coding practices. Invariant integrates [Semgrep](https://semgrep.dev) directly into your guardrails, enabling deep analysis of assistant-generated code before it's executed.
0 commit comments