-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
35 lines (31 loc) · 1.51 KB
/
Copy path.env.example
File metadata and controls
35 lines (31 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copy to .env and edit. .env is gitignored and must stay that way.
#
# cp .env.example .env # macOS / Linux
# copy .env.example .env # Windows
#
# Real environment variables win over this file, so CI or a container can
# override anything here without touching a tracked file.
# ---------------------------------------------------------------- the demo --
DB_PATH=telecom.db
AUDIT_LOG=audit.log
# Every read is capped. Not a performance setting — an unbounded SELECT *
# doesn't corrupt anything, it just eats the context window you needed.
MAX_ROWS=200
# The gate an agent cannot reach. --write gets a caller past the flag; this
# still has to be true. Leave it false unless the database is meant to change.
ALLOW_WRITES=false
# -------------------------------------------------- pointing at a real one --
# The same tool shape works against a server database. The credential lives
# HERE and nowhere else: not in the code, not in a notebook, not in a prompt,
# not in the agent's context. db.py redacts it before printing anything.
#
# DATABASE_URL=postgresql://readonly_user:REPLACE_ME@localhost:5432/appdb
#
# Best practice, and it is not extra work: make that user SELECT-only, and
# point it at views rather than base tables. Then the worst case an agent can
# reach is a wrong answer instead of a wrong write — and you stop relying on
# the tool being perfect.
#
# CREATE ROLE readonly_user LOGIN PASSWORD '...';
# GRANT USAGE ON SCHEMA public TO readonly_user;
# GRANT SELECT ON v_monthly_bill TO readonly_user;