-
Notifications
You must be signed in to change notification settings - Fork 0
check pending 5 behind level requests #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Feature/data quality checks
Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
test: Run Streamlit Web UI
fix: Fix Web UI loading error
Refactor and simplify the Unified Workflow Web UI
Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Add readme file update about why Trust based systems are better Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Enhanced Plugin System (src/core/unified_plugin_manager.py) Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
TrustLLM Comprehensive Plugin (src/plugins/trustllm_plugin.py) Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
LLM-Specific Reliability Plugin (src/plugins/llm_reliability_plugin.py) Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Trust isn't static - it evolves over time and contexts Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
AI systems don't operate in isolation - they interact and influence each other Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
The Problem: Different stakeholders need different trust criteria for the same system Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
The Problem: Need to test trust under extreme conditions before deployment Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
…eline The Problem: Need seamless integration from development to production with trust monitoring Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
The Problem: Need to scale trust evaluation across distributed systems Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
The Problem: Need intuitive visualization of complex trust metrics Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
OpenTrustEval from a simple evaluation tool into a comprehensive trust management platform Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Updates: OpenTrustEval from a simple evaluation tool into a comprehensive trust management platform Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Retest web UI and validate libraries
Retest web UI and validate libraries
I am moving the test files.
I am re-testing the web UI and moving the test files.
Security policy addition Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
Bug report and features request templates
codeql configuration Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
security code fix Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
| condition = params['condition'] | ||
| if not self.is_safe_query(condition, df.columns): | ||
| raise ValueError("Unsafe filter condition detected. Only simple column comparisons are allowed.") | ||
| df = df.query(condition) |
Check failure
Code scanning / CodeQL
Code injection Critical
user-provided value
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 months ago
To fix the code injection vulnerability, we should avoid passing user-provided strings directly to df.query(). Instead, for filter operations, we should require the user to specify the column, operator, and value as separate fields in the transformation JSON. Then, construct the filter using pandas boolean indexing, which does not evaluate code. This change should be made in the process_dataset method in data_engineering/dataset_integration.py, specifically in the block handling the 'filter' operation.
Steps:
- Update the
'filter'operation to expectparamswith keys:column,operator, andvalue(instead of a singleconditionstring). - Validate that the column exists, the operator is one of a safe set (
==,!=,<,>,<=,>=), and the value is a simple literal. - Construct the filter using pandas boolean indexing, e.g.,
df[df[column] <op> value]. - Update the placeholder and documentation in the web UI to reflect the new expected format for filter transformations.
Required changes:
- In
process_dataset, replace thedf.query(condition)block with code that parses and applies the filter using boolean indexing. - Optionally, update the Gradio UI placeholder to show the new filter format (in
data_engineering/scripts/easy_dataset_webui.py).
-
Copy modified lines R348-R369
| @@ -347,6 +347,24 @@ | ||
| elif operation == 'filter': | ||
| condition = params['condition'] | ||
| if not self.is_safe_query(condition, df.columns): | ||
| raise ValueError("Unsafe filter condition detected. Only simple column comparisons are allowed.") | ||
| df = df.query(condition) | ||
| # Expect params: {'column': ..., 'operator': ..., 'value': ...} | ||
| column = params.get('column') | ||
| operator = params.get('operator') | ||
| value = params.get('value') | ||
| allowed_operators = ['==', '!=', '<', '>', '<=', '>='] | ||
| if column not in df.columns: | ||
| raise ValueError(f"Column '{column}' not found in dataset.") | ||
| if operator not in allowed_operators: | ||
| raise ValueError(f"Operator '{operator}' is not allowed.") | ||
| # Apply filter using boolean indexing | ||
| if operator == '==': | ||
| df = df[df[column] == value] | ||
| elif operator == '!=': | ||
| df = df[df[column] != value] | ||
| elif operator == '<': | ||
| df = df[df[column] < value] | ||
| elif operator == '>': | ||
| df = df[df[column] > value] | ||
| elif operator == '<=': | ||
| df = df[df[column] <= value] | ||
| elif operator == '>=': | ||
| df = df[df[column] >= value] | ||
| elif operation == 'sort': |
-
Copy modified line R251
| @@ -250,3 +250,3 @@ | ||
| label="Transformations (JSON)", | ||
| placeholder='[{"operation": "filter", "params": {"condition": "age > 30"}}]', | ||
| placeholder='[{"operation": "filter", "params": {"column": "age", "operator": ">", "value": 30}}]', | ||
| lines=5 |
code quality check Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Kumar Vel <11884941+Kumarvels@users.noreply.github.com>
old pending requests behind the current level at least 5 of them