Skip to content

Add a strict mode. If on agent can't query tables not listed in context files - #1387

Open
ad4mou wants to merge 6 commits into
feat/exclude-columns-from-agent-1015from
feat/context-permissions-1040
Open

Add a strict mode. If on agent can't query tables not listed in context files#1387
ad4mou wants to merge 6 commits into
feat/exclude-columns-from-agent-1015from
feat/context-permissions-1040

Conversation

@ad4mou

@ad4mou ad4mou commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a per-database allow_listed_only setting: when on, SQL can only touch tables that exist in synced context files.
  • Both the agent and manual SQL edits get a clear error listing what was blocked and what’s allowed, so they can adjust.

Closes #1040

Review in cubic

@ad4mou
ad4mou marked this pull request as draft August 11, 2026 12:43

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/nao_core/config/databases/allow_listed_only_guard.py Outdated
Comment thread cli/nao_core/config/databases/allow_listed_only_guard.py Outdated
Comment thread apps/backend/fastapi/main.py
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL https://pr-1387-c39aa2b.preview.getnao.io
Commit c39aa2b

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

@ad4mou
ad4mou marked this pull request as ready for review August 11, 2026 13:28

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/nao_core/config/databases/allow_listed_only_guard.py Outdated
Comment thread cli/nao_core/config/databases/allow_listed_only_guard.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/tests/nao_core/config/test_exclude_columns_guard.py Outdated
Comment thread cli/nao_core/config/databases/query_guard.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant