Project guide

Project Guide | Secure XL2HWP Local

Free local-first document conversion security checklist for spreadsheet-to-HWP workflows. This guide organizes the repository's original implementation notes for Korean document automation teams and privacy reviewers.

Reviewed 2026-07-28. This page is derived from checked-in repository evidence and links back to its source.

secure-xl2hwp-local

Pilot-ready reference implementation for Excel-to-Hancom document conversion in air-gapped and controlled local environments. It cleans spreadsheet data using contract-based rules and maps it to Hancom (HWP) templates, with file-backed audit events and signed exports.

Compliance review pack: `docs/architecture-pack.md`

System Overview

A local-first Korean document automation tool that turns repetitive Excel-to-Hancom work into signed, auditable exports.

AreaDetails
UsersKorean back-office teams, public-sector-adjacent operators, legal/admin teams, and secure internal workflow owners.
Technical pathValidate the demo, README, architecture notes, and quality gate before deeper workflow review.
System scopeJWT auth, signed exports, audit logs, local operation, structured output, and Hancom-focused workflow design.
Operating boundaryCustomer-owned, single-process pilot. Login throttling and audit hash state are process-local; shared access requires an upstream rate limiter, customer identity controls, persistent storage, and approved workstation policies.
Evaluation pathRun the backend checks and generate a sample signed export from staged input data.

Evaluation Path

Architecture Notes

Key Features

Quickstart

cd secure-xl2hwp-local
python3 -m venv .venv
source .venv/bin/activate
pip install '.[dev]'
cp .env.example .env
python scripts/create_sample_excel.py

Blank secrets are generated in dev only and are deliberately reported as ephemeral-dev-only. They are invalid for a protected pilot.

Or use Make:

make install
make sample-data
make run

Optional: Ollama models

ollama pull qwen2.5:7b
ollama pull qwen2.5:14b

Set ENABLE_LLM=false in .env if not using Ollama. The deterministic pipeline still runs when the LLM is unavailable.

Running

make run

Web UI at http://127.0.0.1:8080/

Features: login/JWT session, path/file mode execution, metrics visualization, audit timeline, bilingual UI (Korean/English), theme toggle, signed export + verification.

Auth Setup

The default specs/security/users.yaml is empty. Before using:

  1. Set strong, independently generated values for JWT_SECRET_KEY, AUTH_PASSWORD_PEPPER, EXPORT_SIGNING_KEY in .env
  2. Generate password hashes: python scripts/hash_password.py --password 'StrongPassword!' --pepper 'YOUR_PEPPER'
  3. Write specs/security/users.yaml with the hash
  4. Configure PROCESS_ALLOWED_ROLES and path restrictions
  5. For shared pilot access, set RUNTIME_OWNER=customer, RUNTIME_WORKERS=1, AUTH_RATE_LIMIT_MODE=upstream-enforced, and AUDIT_STORAGE_MODE=persistent-filesystem
  6. Verify the upstream control and persistent mount independently; these settings declare an operator contract and do not provision those controls

API Endpoints

EndpointDescription
POST /auth/loginJWT login
GET /auth/meCurrent user info
POST /process/pathProcess spreadsheet by path
GET /healthBootstrap state, signing status
GET /ops/readinessPre-flight checks
GET /ops/service-briefAllowed roles, trust boundary
GET /ops/runtime-scorecardRuntime health summary
GET /ops/architecture-packExport evidence and approval gates
GET /ops/audit/recentRecent audit events
GET /ops/audit/export/summary.bundle.zipSigned audit bundle
POST /ops/audit/export/verifyVerify export signatures

Output Artifacts

Project Structure

app/
  api/                 # API schemas
  connectors/          # Optional Hancom Windows COM connector
  core/                # Settings, logging
  pipeline/            # CoT orchestrator
  services/            # Auth/Audit/SpecKit/Template/Export/Pipeline
specs/
  contracts/           # Data contract YAML
  profiles/            # Cleanup profile YAML
  templates/           # Hancom template mapping
  security/            # Local users registry
scripts/
examples/
docs/

Tests

pytest -q
ruff check app tests scripts

The test suite covers JWT auth, the single-process login guard, protected-runtime fail-closed settings, export signature verification, CoT pipeline stages, and path traversal blocking.

Docs

Cloud + AI Architecture

Enterprise Productization

System Architecture

Service Architecture

Search And Service Surface