Announcing Beacon: Self-improving memory for coding agents
← All skills
Skill

drizzle

skill:triggerdotdev/trigger.dev#drizzle

Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the `@internal/dashboard-agent-db` package (the dashboard agent's conversation datastore). Covers pg-core schema definition, the postgres-js driver, drizzle-kit migrations, and this repo's conventions: a dedicated Postgres schema, foreign-key-free cross-database design, pooler-safe connections, and the access-pattern query layer. Drizzle is NOT the main database — that's Prisma.

Verdict
Inconclusive

The analysis could not cover enough of the artifact to decide.

Analyzed Oct 27, 2026, 22:52 UTC at 8cb5fd8

Dispute security verdict

If you believe this verdict is incorrect, submit a dispute and we'll review it.

0
findings
—
highest severity
0
threat classes
7,494
files scanned
1,156/1,156
checks satisfied
0
package advisories

Why this verdict

  • inconclusive: gap frontmatter_unparseable at .claude/skills/drizzle/SKILL.md
  • inconclusive: gap skill_frontmatter_invalid at .claude/skills/drizzle/SKILL.md
  • inconclusive: unresolved question on CRED
  • inconclusive: unresolved question on unknown class

Security findings 0

No individual findings recorded

The inconclusive verdict rests on the open questions and coverage gaps below; 2 candidate findings were refuted on review.

Open questions 7

What the analysis could not settle from the code alone.

What consumes internal-packages/dashboard-agent-db/.env.schema, and does the # @import(../../) directive resolve to the repository root .env (with live credentials) when the package's environment is loaded? No code shown in this pass reads the file.
Credential access
All tables in these drizzle snapshots record isRLSEnabled: false (e.g. chats, chat_messages, chat_sessions, watches, investigations) despite organization_id/user_id multi-tenant columns; is tenant isolation enforced by application code or policies outside this artifact, or is cross-tenant access possible?
Residue R4 (file_write '[' at SKILL.md line 176, unit SRC:b797149ff9200299) and contradiction C1 against claim D3 (SRC:df9f4fa289bdd4d8) could not be confirmed: line 176 is documentation that drizzle-orm's extra-config callback returns an array ('(t) => [ ... ]'), not any instruction to write files, so none of necessary/unexplained/concealed applies because no capability exists at the cited line.
Persistence
The trigger_dashboard_agent schema snapshots define multi-tenant tables (organization_id/user_id columns, chat content, and a chat_sessions.public_access_token column) with isRLSEnabled: false throughout; is tenant isolation enforced elsewhere, or does the shipped schema lack row-level security on user-data tables?
[file request hosting/docker/webapp/.env] Does this env file define DATABASE_URL or other credentials, and is it consumed by anything that feeds the dashboard-agent-db package environment reached via the '@import(../../)' directive?
Credential access
[file request hosting/docker/worker/.env] Does this env file define DATABASE_URL or other credentials, and is it consumed by anything that feeds the dashboard-agent-db package environment reached via the '@import(../../)' directive?
Credential access
[file request .env] Does the dotenv file targeted by the '@import(../../)' directive in internal-packages/dashboard-agent-db/.env.schema exist in the repository, and what values (e.g. root DATABASE_URL or other secrets) does it contribute to the dashboard-agent-db package environment?
Credential access
Refuted findings 2

Candidates the review stage examined and rejected, kept for transparency.

Code execution

criticalRefutedlow confidence

The exported test helper applyDashboardAgentMigrations reads every .sql file under the MIGRATIONS_DIR constant at runtime and executes each parsed statement through a caller-supplied MigrationExecutor, forming a file-read-to-SQL-execution chain whose source path and executor are not defined in the shown content.

const migration = await readFile(path.join(MIGRATIONS_DIR, file), 
Why it was refuted

The claim that the source path is 'not defined in the shown content' is contradicted by the code: MIGRATIONS_DIR is pinned to the package's own ../drizzle migrations directory, and reading those .sql files to replay them via the caller-supplied executor is the standard, documented purpose of a drizzle migration test helper (normal core capability), so the harm gate fails despite a real but intra-repo read-to-execute flow.

Credential access

highRefutedlow confidence

The tracked dotenv-format file .env.schema in the agent datastore package contains an @import directive referencing the repository root, so any consumer that loads this env file chains in whatever env vars the root env file holds (e.g. DATABASE_URL credentials).

# @import(../../)
Why it was refuted

The quoted line is a '#'-prefixed comment in a dotenv-format schema doc file, so under standard dotenv parsing it is inert and does not chain anything; even if an import-capable loader honored it, the target is the artifact's own repository root env for the same project's package, crossing no trust boundary. No consumer that loads .env.schema and no source-to-sink chain is shown, so the harm and chain gates fail and the finding dies.

Coverage gaps 29

Parts of the artifact the static analysis could not fully examine.

context:submodule_present submodules are not fetched
.gitmodules
context:unanalyzable_binary binary content is only byte-scanned
apps/webapp/app/runEngine/concerns/queues.server.ts
context:unanalyzable_binary binary content is only byte-scanned
apps/webapp/app/services/realtime/envChangeRouter.server.ts
context:unanalyzable_binary binary content is only byte-scanned
apps/webapp/public/favicon.ico
context:frontmatter_unparseable while scanning an alias
.cursor/rules/writing-tasks.mdc
context:manifest_unparseable yaml: YAML aliases are not permitted
hosting/docker/webapp/docker-compose.yml
context:manifest_unparseable yaml: YAML aliases are not permitted
hosting/docker/worker/docker-compose.yml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/clickhouse.yaml
context:manifest_unparseable yaml: while parsing a flow mapping
hosting/k8s/helm/templates/datastore-secret.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/extra-manifests.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/registry-ingress.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/registry.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/s2.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/secrets.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/servicemonitor.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/supervisor.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/tests/test-clickhouse.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/tests/test-postgresql.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/tests/test-redis.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/tests/test-s3.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/tests/test-supervisor.yaml
context:manifest_unparseable yaml: while parsing a block mapping
hosting/k8s/helm/templates/tests/test-webapp.yaml
context:manifest_unparseable yaml: while parsing a flow mapping
hosting/k8s/helm/templates/validate-external-config.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/webapp-ingress.yaml
context:manifest_unparseable yaml: while parsing a flow node
hosting/k8s/helm/templates/webapp.yaml
context:manifest_unparseable yaml: YAML input exceeds 1048576 bytes
pnpm-lock.yaml
context:frontmatter_unparseable mapping values are not allowed here
rules/4.0.0/claude-code-agent.md
skill_frontmatter_invalid missing name/description frontmatter
.claude/skills/drizzle/SKILL.md
frontmatter_unparseable mapping values are not allowed here
.claude/skills/drizzle/SKILL.md