Map and govern where your AI data and traffic flow — east-west / APAC lens.
Project description
borderlint
Map and govern where your AI data and traffic flow — east-west / APAC lens.
A static, in-CI check for HK / GBA entities: does your AI data stay within the jurisdictions
your PDPO / PIPL policy allows? borderlint statically scans your repo (Python and
TypeScript/JavaScript) for AI provider usage, resolves each flow to a jurisdiction (ccTLD codes
plus the CN-GBA / GBA tokens), and fails the build on any flow outside the allow-list for the
data class you declare. Western and Chinese providers are treated evenly. Zero runtime dependencies.
Use
python -m borderlint scan ./service --policy residency.json --classification customer-pii
- No
--policy→ inventory mode (lists flows + jurisdictions, exits 0). --format json|mermaidfor machine output or a flow map.- Exit code is non-zero on a violation, so it gates CI.
Policy (the eval-set)
residency.json maps each data class to the jurisdictions you accept:
{
"home_regime": "pdpo",
"classifications": {
"customer-pii": ["hk", "CN-GBA", "sg"],
"employee-pii": ["hk", "CN-GBA"],
"non-pii": ["hk", "CN-GBA", "cn", "mo", "sg", "us", "gb"]
}
}
Deny-by-default: a flow to any code not on the list for the declared class fails — so sg is
allowed but my is not, matching a PDPO agreed-locations EULA. GBA is shorthand for hk +
CN-GBA. Cross-border arrangements (e.g. the GBA Standard Contract) are surfaced as reference
links, never adjudicated.
Capabilities
- Languages: Python (AST) and TypeScript/JavaScript (
import/require/ dynamicimport()), plus endpoint references in config/text files. - Providers: 13+ across the east-west boundary (OpenAI, Anthropic, Google, Azure, Bedrock,
Mistral, Cohere + Tencent, Alibaba, DeepSeek, Moonshot, Zhipu, Baidu), with Python and JS/TS
package names and the Vercel AI SDK (
@ai-sdk/*). - Aggregators: litellm, langchain, LlamaIndex, aisuite, Vercel AI core (
ai) →unknown(runtime-routed), soon_unknown: failblocks them for sensitive classes. - Jurisdictions: ccTLD/ISO codes +
CN-GBA/GBA; AWS/Azure region resolved from the endpoint host where present (e.g.bedrock-runtime.ap-east-1…→hk). - Policy: classification-keyed JSON eval-set, deny-by-default, provider allow/deny, configurable failure set, declared home regime.
- Output & CI: text / JSON / Mermaid, exit codes, GitHub Action + Jenkins.
Scope
For HK / GBA home bases under PDPO / PIPL / GBA. Not yet: SARIF output, container/SCA mode, LLM
enrichment, and dynamic / base_url endpoint resolution. Full roadmap in CAPABILITIES.md.
CI
Same command in any pipeline. GitHub Actions (composite action):
- uses: iolairus/borderlint@v0.2.0
with: { path: ., policy: residency.json, classification: customer-pii }
Jenkins / anything else: pip install borderlint && borderlint scan . --policy residency.json --classification customer-pii — a non-zero exit fails the stage. Full examples in examples/ci/.
License
MIT © 2026 Iolaire McKinnon. Vendor-neutral by design.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file borderlint-0.2.0.tar.gz.
File metadata
- Download URL: borderlint-0.2.0.tar.gz
- Upload date:
- Size: 69.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
799dd49b7d0dfe92a28951fd9a48f0a10e5f058811f459faafe86659884d66f8
|
|
| MD5 |
cc79517f8fe82664de7dc4d165e1923c
|
|
| BLAKE2b-256 |
8a180bd5751092637cc329668f4cca2534ccaca406f03a1b58ce9124a9174092
|
Provenance
The following attestation bundles were made for borderlint-0.2.0.tar.gz:
Publisher:
release.yml on iolairus/borderlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
borderlint-0.2.0.tar.gz -
Subject digest:
799dd49b7d0dfe92a28951fd9a48f0a10e5f058811f459faafe86659884d66f8 - Sigstore transparency entry: 1879181346
- Sigstore integration time:
-
Permalink:
iolairus/borderlint@92cd34956a19936d045a0e08b13047bf17b939d2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/iolairus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@92cd34956a19936d045a0e08b13047bf17b939d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file borderlint-0.2.0-py3-none-any.whl.
File metadata
- Download URL: borderlint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a25653c964bbacd229c4bd56f74025411b3a0bccf740b006522936fdc257360
|
|
| MD5 |
4287262249b0ec35c53b7e5d104c603c
|
|
| BLAKE2b-256 |
3877cf8a2cd867dece3f46d997e381a48d61c779b4281f4ba6019d93fddcd204
|
Provenance
The following attestation bundles were made for borderlint-0.2.0-py3-none-any.whl:
Publisher:
release.yml on iolairus/borderlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
borderlint-0.2.0-py3-none-any.whl -
Subject digest:
5a25653c964bbacd229c4bd56f74025411b3a0bccf740b006522936fdc257360 - Sigstore transparency entry: 1879181383
- Sigstore integration time:
-
Permalink:
iolairus/borderlint@92cd34956a19936d045a0e08b13047bf17b939d2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/iolairus
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@92cd34956a19936d045a0e08b13047bf17b939d2 -
Trigger Event:
push
-
Statement type: