fix: auth, RBAC, and template rendering hardening#3350
Merged
crivetimihai merged 4 commits intomainfrom Mar 1, 2026
Merged
Conversation
- Harden admin auth credential verification to ensure non-admin users receive proper 403/302 responses instead of falling through to alternate auth paths - Add RBAC permission decorators to all LLM Chat endpoints for consistency with the LLM proxy router - Introduce tojson_attr Jinja2 filter for safe rendering of template variables in inline JS event handler attributes - Add SecurityValidator field validators to LLM provider and model schemas - Fix Alpine.js x-data attribute integrity in admin team selector Includes regression tests for all changed paths. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Add tests for Optional field None-passthrough and non-None validation paths on LLMProviderUpdate, LLMModelUpdate, and LLMModelBase. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
The upload-sarif action needs refs/heads/main to compute the diff base. A shallow PR-only checkout lacks that ref, causing persistent fetch failures during Trivy and Dockle SARIF uploads. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
trivy-action@master internally checks out aquasecurity/trivy contrib/ which fails to resolve refs/heads/main with the workflow GITHUB_TOKEN. Switch to direct trivy CLI install and invocation — the existing Upload Trivy SARIF step handles the CodeQL upload correctly. Also reverts the unnecessary fetch-depth: 0 added in the prior attempt. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
MohanLaksh
pushed a commit
that referenced
this pull request
Mar 12, 2026
* fix: auth, RBAC, and template rendering hardening - Harden admin auth credential verification to ensure non-admin users receive proper 403/302 responses instead of falling through to alternate auth paths - Add RBAC permission decorators to all LLM Chat endpoints for consistency with the LLM proxy router - Introduce tojson_attr Jinja2 filter for safe rendering of template variables in inline JS event handler attributes - Add SecurityValidator field validators to LLM provider and model schemas - Fix Alpine.js x-data attribute integrity in admin team selector Includes regression tests for all changed paths. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test: achieve 100% diff coverage for LLM schema validators Add tests for Optional field None-passthrough and non-None validation paths on LLMProviderUpdate, LLMModelUpdate, and LLMModelBase. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ci): fetch full history in docker-scan for CodeQL SARIF uploads The upload-sarif action needs refs/heads/main to compute the diff base. A shallow PR-only checkout lacks that ref, causing persistent fetch failures during Trivy and Dockle SARIF uploads. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ci): replace trivy-action@master with direct CLI to fix SARIF upload trivy-action@master internally checks out aquasecurity/trivy contrib/ which fails to resolve refs/heads/main with the workflow GITHUB_TOKEN. Switch to direct trivy CLI install and invocation — the existing Upload Trivy SARIF step handles the CodeQL upload correctly. Also reverts the unnecessary fetch-depth: 0 added in the prior attempt. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
8 tasks
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
receive proper 403/302 responses instead of falling through to
alternate auth paths
consistency with the LLM proxy router
tojson_attrJinja2 filter for safe rendering of templatevariables in inline JS event handler attributes
schemas
Test plan
tojson_attrencoding contract tests(colons, parens), deep nesting, and URL schemes