Security Pipeline #124
security.yml
on: schedule
Static Analysis
44s
Dependency Scanning
22s
Secret Detection
7s
License Compliance
21s
Security Tests
27s
Security Report
4s
Annotations
8 errors and 5 warnings
|
tests/services/performance.test.ts > Database Performance Tests:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/services/foia-request.service.test.ts > FOIARequestService:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/services/auth.service.test.ts > AuthService:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/services/agency.service.test.ts > AgencyService:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/api/api.test.ts > Agency API Tests:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/api/api.test.ts > Auth API Tests:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
tests/api/api.test.ts > API Integration Tests:
apps/api/tests/utils.ts#L65
Error: Failed query:
CREATE TABLE IF NOT EXISTS users (
id TEXT PRIMARY KEY NOT NULL,
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
role TEXT DEFAULT 'civilian' NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
organization TEXT,
is_verified BOOLEAN DEFAULT false NOT NULL,
is_anonymous BOOLEAN DEFAULT false NOT NULL,
two_factor_enabled BOOLEAN DEFAULT false NOT NULL,
two_factor_secret TEXT,
failed_login_attempts INTEGER DEFAULT 0 NOT NULL,
locked_until TIMESTAMP,
last_failed_login_at TIMESTAMP,
password_changed_at TIMESTAMP,
must_change_password BOOLEAN DEFAULT false NOT NULL,
terms_accepted_at TIMESTAMP,
privacy_accepted_at TIMESTAMP,
data_processing_consent_at TIMESTAMP,
marketing_consent_at TIMESTAMP,
consent_updated_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS sessions (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
expires_at TIMESTAMP NOT NULL,
ip_address TEXT,
user_agent TEXT,
device_name TEXT,
last_active_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
key_hash TEXT NOT NULL,
key_preview TEXT NOT NULL,
name TEXT DEFAULT 'Default' NOT NULL,
last_used_at TIMESTAMP,
expires_at TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS agencies (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
abbreviation TEXT,
jurisdiction_level TEXT NOT NULL,
state TEXT,
city TEXT,
county TEXT,
foia_email TEXT,
foia_address TEXT,
foia_portal_url TEXT,
response_deadline_days INTEGER DEFAULT 20 NOT NULL,
appeal_deadline_days INTEGER DEFAULT 30 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS request_templates (
id TEXT PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL,
description TEXT NOT NULL,
template_text TEXT NOT NULL,
jurisdiction_level TEXT,
created_by TEXT REFERENCES users(id),
is_official BOOLEAN DEFAULT false NOT NULL,
usage_count INTEGER DEFAULT 0 NOT NULL,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS foia_requests (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
agency_id TEXT NOT NULL REFERENCES agencies(id),
status TEXT DEFAULT 'draft' NOT NULL,
category TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT NOT NULL,
date_range_start TIMESTAMP,
date_range_end TIMESTAMP,
template_id TEXT REFERENCES request_templates(id),
tracking_number TEXT,
estimated_fee REAL,
actual_fee REAL,
submitted_at TIMESTAMP,
acknowledged_at TIMESTAMP,
due_date TIMESTAMP,
completed_at TIMESTAMP,
denial_reason TEXT,
is_public BOOLEAN DEFAULT true NOT NULL,
content_purge_at TIMESTAMP,
content_purged BOOLEAN DEFAULT false NOT NULL,
title_hash TEXT,
created_at TIMESTAMP DEFAULT NOW() NOT NULL,
updated_at TIMESTAMP DEFAULT NOW() NOT NULL
);
CREATE TABLE IF NOT EXISTS documents (
id TEXT PRIMARY KEY NOT NULL,
request_id TEXT REFERENCES foia_requests(id),
agency_id TEXT NOT NULL REFERENCES agencies(id),
uploaded_by TEXT NOT NULL REFERENCES users(id),
type TEXT NOT NULL,
title TEXT NOT NULL,
description TEXT,
file_name TEXT NOT NULL,
file_path TEXT NOT NULL,
|
|
Static Analysis
@foia-stream/shared#typecheck: command (/home/runner/work/foia-stream/foia-stream/packages/shared) /home/runner/.bun/bin/bun run typecheck exited (2)
|
|
Secret Detection
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
License Compliance
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Dependency Scanning
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Security Tests
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Static Analysis
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|