{
  "_id": "6ae7e8929ceaa78f2009b09c",
  "Package": "credgate",
  "Title": "Detect Indian Personal Data Before It Reaches Language Models",
  "Version": "0.1.0.9000",
  "Authors@R": "c(person(\"Bharat\", \"Sikka\", role = c(\"aut\", \"cre\", \"cph\"),\nemail = \"bharat8sikka@gmail.com\"),\nperson(\"Aishwarya\", \"Bais\", role = c(\"aut\", \"cph\"),\nemail = \"aishwarya.bais00@gmail.com\"))",
  "Description": "Detects personal data in text before it is sent to a large\nlanguage model, with Indian identifiers built in: Aadhaar\n(validated with the Verhoeff checksum), Aadhaar Virtual ID,\nPAN, GSTIN, voter ID, passport, driving licence, CKYC, ration\ncard and job card numbers, UPI IDs, IFSC codes, bank account\nand payment card numbers with expiry dates and verification\ncodes, mobile numbers and Ayushman Bharat (ABHA) health IDs,\nplus rule-based detection of names and addresses in Latin and\nIndic scripts. Candidates are validated with checksums, scored\nfrom surrounding context and matched through Indic digits and\ninvisible characters. The rules come from a language-neutral\nspecification shared with the 'Python' package of the same\nname.",
  "License": "Apache License (>= 2)",
  "URL": "https://dwarpal.github.io/credgate/r/,\nhttps://github.com/dwarpal/credgate",
  "BugReports": "https://github.com/dwarpal/credgate/issues",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://dwarpal.r-universe.dev",
  "Date/Publication": "2026-11-01 21:52:31 UTC",
  "RemoteUrl": "https://github.com/dwarpal/credgate",
  "RemoteRef": "HEAD",
  "RemoteSha": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
  "RemoteSubdir": "pkg/credgate",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-11-02 00:59:17 UTC",
    "User": "root"
  },
  "Author": "Bharat Sikka [aut, cre, cph],\nAishwarya Bais [aut, cph]",
  "Maintainer": "Bharat Sikka <bharat8sikka@gmail.com>",
  "_user": "dwarpal",
  "_type": "src",
  "_file": "credgate_0.1.0.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/1a19851223ee9cd05bde598faaf17f393ab4c28712c4169da662630c057f2fe4",
  "_filesize": 313811,
  "_sha256": "1a19851223ee9cd05bde598faaf17f393ab4c28712c4169da662630c057f2fe4",
  "_expires": "2027-02-10T01:34:08.000Z",
  "_created": "2026-11-02T00:59:17.000Z",
  "_published": "2026-11-02T01:34:10.137Z",
  "_upstream": "https://github.com/dwarpal/credgate",
  "_status": "success",
  "_maintainer": {
    "name": "Bharat Sikka",
    "email": "bharat8sikka@gmail.com",
    "login": "bharatsikka",
    "description": "Author | Data Scientist\n\nhttps://www.amazon.com/dp/B097TNCSM8/ref=sr_1_1?dchild=1&keywords=Elements+of+Deep+Learning+for+Computer+Vision+bpb&qid=1624605611&sr",
    "uuid": 33205704
  },
  "_jobs": [
    {
      "job": 125038486097,
      "time": 224,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13108188644"
    },
    {
      "job": 125038486153,
      "time": 269,
      "config": "linux-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13108099084"
    },
    {
      "job": 125038486113,
      "time": 2055,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13110446265"
    },
    {
      "job": 125038486248,
      "time": 316,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13108378425"
    },
    {
      "job": 125037546137,
      "time": 222,
      "config": "source",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13108528842"
    },
    {
      "job": 125038486109,
      "time": 107,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "13108623850"
    },
    {
      "job": 125038486104,
      "time": 391,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "13108973378"
    },
    {
      "job": 125038486184,
      "time": 382,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "13108637914"
    },
    {
      "job": 125038486171,
      "time": 315,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "ERROR",
      "artifact": "13108768884"
    }
  ],
  "_buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775",
  "_commit": {
    "id": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
    "author": "Bharat Sikka <33205704+bharatsikka@users.noreply.github.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Release credgate 0.6.0 for Python (#26)\n\nVersion bump and dated changelog. After merging, tag `py-v0.6.0` on main\nto publish to PyPI.\n\n## In 0.6.0 (merged in #13-#25)\n- **Policies** per model endpoint (local, internal, frontier): allow,\nredact, tokenise or block, with combinations such as card + CVV + expiry\n→ block for frontier models.\n- **Audit log**: hash-chained, tamper-evident, no values; keyed hashes;\nverification.\n- **Keyed tokens**: the same token for the same identifier across\nvaults, sessions and languages; vault merging.\n- **New identifiers**: CVV (new `sensitive_auth` class, never stored),\ncard expiry, CKYC, ration card, NREGA job card. Column names now label\nCVV and ration card values in scans.\n- **PII inventory** (`pii_inventory()`): where PII is, across tables;\nCSV written identically by R and Python.\n- **Spark**: `scan_pii()` / `pii_inventory()` on PySpark DataFrames,\nsampled in the cluster.\n- **BigQuery** (`credgate.bigquery`): tables and whole datasets, sampled\nby BigQuery, cost checked by dry run before every query; verified\nagainst real BigQuery.\n- **Documentation site**: https://dwarpal.github.io/credgate/\n- New extras `bigquery` and `spark` (Spark not in `all`).\n\n## Checked\n- `python -m build`; `twine check --strict` passes wheel and sdist.\nMetadata: Version 0.6.0, Documentation URL, extras all, arrow, bigquery,\nduckdb, polars, spark, test, vault.\n- Clean installs from the wheel (Python 3.13, macOS):\n- **plain**: redact, tokenise/restore, scan with column labels,\ninventory write/read, BigQuery query building, CLI `--version`;\n  - **[bigquery]**: the BigQuery client imports;\n- **[all]**, with the newest releases (DuckDB 2.0, pyarrow 26, Polars\n2.1): Polars and DuckDB SQL redaction, Arrow scan, encrypted vault\nsave/open.\n- Test suite against that [all] install: 345 passed.\n- Docs: live at https://dwarpal.github.io/credgate/ (built from main).",
    "time": 1793569951
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.3",
      "role": "Depends"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "jsonlite",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "stringi",
      "role": "Imports"
    },
    {
      "package": "yaml",
      "role": "Imports"
    },
    {
      "package": "arrow",
      "role": "Suggests"
    },
    {
      "package": "bigrquery",
      "role": "Suggests"
    },
    {
      "package": "askpass",
      "role": "Suggests"
    },
    {
      "package": "DBI",
      "role": "Suggests"
    },
    {
      "package": "dbplyr",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "duckdb",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "openssl",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "RSQLite",
      "role": "Suggests"
    },
    {
      "package": "sodium",
      "role": "Suggests"
    },
    {
      "package": "sparklyr",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "dwarpal",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-44",
      "n": 45
    }
  ],
  "_tags": [
    {
      "name": "py-v0.1.0",
      "date": "2026-10-31"
    },
    {
      "name": "py-v0.2.0",
      "date": "2026-10-31"
    },
    {
      "name": "py-v0.3.0",
      "date": "2026-10-31"
    },
    {
      "name": "py-v0.3.1",
      "date": "2026-10-31"
    },
    {
      "name": "py-v0.4.0",
      "date": "2026-11-01"
    },
    {
      "name": "py-v0.5.0",
      "date": "2026-11-01"
    },
    {
      "name": "py-v0.6.0",
      "date": "2026-11-01"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "bharatsikka",
      "count": 45,
      "uuid": 33205704
    }
  ],
  "_userbio": {
    "uuid": 350680317,
    "type": "organization",
    "name": "dwarpal",
    "followers": 0
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/credgate"
  },
  "_devurl": "https://github.com/dwarpal/credgate",
  "_pkgdown": "https://dwarpal.github.io/credgate/r/",
  "_searchresults": 0,
  "_rbuild": "4.6.2",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/credgate.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_cranurl": false,
  "_exports": [
    "audit_read",
    "audit_record",
    "audit_verify",
    "bounded",
    "bq_inventory_dataset",
    "bq_pii_inventory",
    "bq_scan_pii",
    "cg_audit_log",
    "cg_detectors",
    "cg_evaluate",
    "cg_key_fingerprint",
    "cg_new_token_key",
    "cg_normalise",
    "cg_policy",
    "cg_read_corpus",
    "cg_spec_path",
    "cg_vault",
    "detect_pii",
    "gstin_check_char",
    "gstin_valid",
    "luhn_valid",
    "new_detector",
    "pii_inventory",
    "policy_apply",
    "policy_decide",
    "preview",
    "read_inventory",
    "redact",
    "redact_parquet",
    "redact_query",
    "register_detector",
    "restore",
    "scan_pii",
    "synth_indian_pii",
    "tokenise",
    "vault_merge",
    "vault_open",
    "vault_save",
    "verhoeff_check_digit",
    "verhoeff_valid",
    "write_inventory"
  ],
  "_help": [
    {
      "page": "bounded",
      "title": "Wrap a pattern so it only matches whole tokens",
      "topics": [
        "bounded"
      ]
    },
    {
      "page": "bq_scan_pii",
      "title": "Scan and inventory BigQuery tables",
      "topics": [
        "bq_inventory_dataset",
        "bq_pii_inventory",
        "bq_scan_pii"
      ]
    },
    {
      "page": "cg_audit_log",
      "title": "Audit log of policy decisions",
      "topics": [
        "audit_read",
        "audit_record",
        "audit_verify",
        "cg_audit_log"
      ]
    },
    {
      "page": "cg_detectors",
      "title": "List registered detectors",
      "topics": [
        "cg_detectors"
      ]
    },
    {
      "page": "cg_evaluate",
      "title": "Evaluate detection against labelled text",
      "topics": [
        "cg_evaluate"
      ]
    },
    {
      "page": "cg_new_token_key",
      "title": "Token keys for keyed tokens",
      "topics": [
        "cg_key_fingerprint",
        "cg_new_token_key"
      ]
    },
    {
      "page": "cg_normalise",
      "title": "Normalise text for PII detection",
      "topics": [
        "cg_normalise"
      ]
    },
    {
      "page": "cg_policy",
      "title": "Load a policy",
      "topics": [
        "cg_policy"
      ]
    },
    {
      "page": "cg_read_corpus",
      "title": "Read labelled documents from a JSON Lines file",
      "topics": [
        "cg_read_corpus"
      ]
    },
    {
      "page": "cg_spec_path",
      "title": "Path to the detection spec shipped with the package",
      "topics": [
        "cg_spec_path"
      ]
    },
    {
      "page": "cg_vault",
      "title": "Create a token vault",
      "topics": [
        "cg_vault"
      ]
    },
    {
      "page": "detect_pii",
      "title": "Detect PII in text",
      "topics": [
        "detect_pii"
      ]
    },
    {
      "page": "gstin_valid",
      "title": "GSTIN checksum",
      "topics": [
        "gstin_check_char",
        "gstin_valid"
      ]
    },
    {
      "page": "luhn_valid",
      "title": "Luhn checksum (payment cards)",
      "topics": [
        "luhn_valid"
      ]
    },
    {
      "page": "new_detector",
      "title": "Define a PII detector",
      "topics": [
        "new_detector"
      ]
    },
    {
      "page": "pii_inventory",
      "title": "Record where PII is, for an inventory",
      "topics": [
        "pii_inventory"
      ]
    },
    {
      "page": "policy_decide",
      "title": "Decide and apply a policy to a request",
      "topics": [
        "policy_apply",
        "policy_decide"
      ]
    },
    {
      "page": "preview",
      "title": "Preview what would be redacted",
      "topics": [
        "preview"
      ]
    },
    {
      "page": "redact",
      "title": "Redact PII from text",
      "topics": [
        "redact"
      ]
    },
    {
      "page": "redact_parquet",
      "title": "Redact a Parquet file, batch by batch",
      "topics": [
        "redact_parquet"
      ]
    },
    {
      "page": "redact_query",
      "title": "Redact the result of a database query into a table",
      "topics": [
        "redact_query"
      ]
    },
    {
      "page": "register_detector",
      "title": "Register a detector",
      "topics": [
        "register_detector"
      ]
    },
    {
      "page": "restore",
      "title": "Put the values behind tokens back into text",
      "topics": [
        "restore"
      ]
    },
    {
      "page": "scan_pii",
      "title": "Scan the columns of a data frame for PII",
      "topics": [
        "scan_pii"
      ]
    },
    {
      "page": "synth_indian_pii",
      "title": "Generate synthetic Indian identifiers",
      "topics": [
        "synth_indian_pii"
      ]
    },
    {
      "page": "tokenise",
      "title": "Replace identifiers with tokens that can be restored",
      "topics": [
        "tokenise"
      ]
    },
    {
      "page": "vault_merge",
      "title": "Combine keyed vaults",
      "topics": [
        "vault_merge"
      ]
    },
    {
      "page": "vault_save",
      "title": "Save a vault to an encrypted file, and open it again",
      "topics": [
        "vault_open",
        "vault_save"
      ]
    },
    {
      "page": "verhoeff_valid",
      "title": "Verhoeff checksum (used by Aadhaar and Aadhaar Virtual ID)",
      "topics": [
        "verhoeff_check_digit",
        "verhoeff_valid"
      ]
    },
    {
      "page": "write_inventory",
      "title": "Write and read inventory files",
      "topics": [
        "read_inventory",
        "write_inventory"
      ]
    }
  ],
  "_readme": "https://github.com/dwarpal/credgate/raw/HEAD/pkg/credgate/README.md",
  "_rundeps": [
    "cli",
    "jsonlite",
    "rlang",
    "stringi",
    "yaml"
  ],
  "_vignettes": [
    {
      "source": "large-data.Rmd",
      "filename": "large-data.html",
      "title": "Large data: Arrow, Parquet, DuckDB and databases",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Which columns hold personal data?",
        "Arrow and Parquet",
        "DuckDB and other databases",
        "Other databases",
        "Sizes and speed"
      ],
      "created": "2026-11-01 12:36:43",
      "modified": "2026-11-01 12:36:43",
      "commits": 1
    },
    {
      "source": "local-llms.Rmd",
      "filename": "local-llms.html",
      "title": "Using credgate with local LLMs (Ollama, vLLM)",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Why redact when the model is local?",
        "1. Preview, then redact",
        "2. Ollama",
        "3. vLLM (or any OpenAI-compatible server)",
        "4. Getting the real values back: tokenise and restore",
        "5. Data frames: find the PII, send only what is needed",
        "6. Measure it on your own data",
        "Limits and what comes next"
      ],
      "created": "2026-10-31 13:47:30",
      "modified": "2026-11-01 09:44:01",
      "commits": 3
    }
  ],
  "_score": 3,
  "_indexed": true,
  "_nocasepkg": "credgate",
  "_universes": [
    "dwarpal",
    "bharatsikka"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:01:23.000Z",
      "distro": "resolute",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/091fc8720ba523b1aa4a32e6d01a71fa7613f79d553efc2245ea5c2dae768432",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.6.2",
      "os": "linux",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:01:35.000Z",
      "distro": "resolute",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/156fcbea3a7d20aefab14554f65299e5197f8b7db6fb12fd35d7a3beba1382d7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:30:45.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/ded703f336e1bc89a1f5243ef5592b3e94c88cfd8a07bfe2717772ae7bba8777",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:01:01.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/4f4135f1d88c853b43fd95726d93669d1ce817fb97d2c8991565b1338ef13373",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:01:20.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/bdedfec7879c67237967876e351a1f94aff4cce921f46e74957761a85eeeb6a5",
      "status": "success",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:00:26.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/3b372589db71cfa764f4af4b8c3a41380cb3cf350af3e79013b4be093ca1006a",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:00:29.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/b17119ebc334f813eac67716293efcfe3d5795767f6097a1a768a294b5218632",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.1.0.9000",
      "date": "2026-11-02T01:00:34.000Z",
      "commit": "30f417bfdb7c2ef819fc6cb4ebd0815161510824",
      "fileid": "https://r2.ropensci.org/e998bfd449a42c5d965fec9a23740dad51999b99c7dae7bd257c2243bd414bb6",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/dwarpal/actions/runs/41369753775"
    }
  ]
}