원클릭으로
add-field
Guide for adding new fields/columns to scan results, including entity decorators, snapshot integration, and API exposure.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guide for adding new fields/columns to scan results, including entity decorators, snapshot integration, and API exposure.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Runbook for diagnosing and resolving production issues with the Site Scanning Engine on Cloud.gov.
Guide for deploying the Site Scanning Engine to Cloud.gov via GitHub Actions, and using the Cloud Foundry CLI to monitor and troubleshoot deployed environments.
Guide for implementing a new scan in the core-scanner library, including page evaluation, entity integration, and testing.
Common development commands and workflows — linting, testing, building, Docker management, and troubleshooting.
Commands for loading and managing scan data — ingesting federal domains, enqueueing scans, running single-site tests, and exporting snapshots.
Guide through initial development setup of the Site Scanning Engine (prerequisites, Docker, building, first data load).
| name | add-field |
| description | Guide for adding new fields/columns to scan results, including entity decorators, snapshot integration, and API exposure. |
Guide for adding new fields/columns to scan results.
When prototyping new fields for scan results, follow this workflow to test locally before exposing in production API.
Edit the appropriate entity (typically entities/core-result.entity.ts):
import { Exclude } from 'class-transformer';
export class CoreResult {
// ... existing fields
@Column({ type: 'text', nullable: true })
@Exclude() // Hide from API during development
myNewField: string;
}
TypeORM Decorators:
@Column({ type: 'text', nullable: true }) - Database column definition@Exclude() - Hides field from API responses (remove when ready for production)Common column types:
text - Variable length stringboolean - True/falseinteger - Whole numbersjsonb - JSON datatimestamp - Date/timeGenerate a snapshot with the CLI to see your new column in CSV output:
npm run snapshot
The new column will appear in the exported CSV file, allowing you to verify:
Note: Snapshot testing is the primary way to validate new fields locally, since Minio is not fully configured for local dev.
Edit the static snapshot column order in the core-result entity:
static snapshotColumns = [
'id',
'url',
// ... existing columns
'myNewField', // Add your new field in desired position
];
This controls the column order in exported CSV snapshots.
If you changed column order or structure, update tests in:
libs/snapshot/src/snapshot.service.spec.tsRun tests:
npm run test:unit
When the field is ready for production:
@Exclude() decorator from the entity property/api endpoints/api-json@Column({ type: 'boolean', nullable: true, default: false })
@Exclude()
hasMyFeature: boolean;
@Column({ type: 'jsonb', nullable: true })
@Exclude()
myComplexData: Record<string, any>;