dpdp-scan 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dpdp_scan-0.1.1/LICENSE +202 -0
- dpdp_scan-0.1.1/NOTICE +20 -0
- dpdp_scan-0.1.1/PKG-INFO +203 -0
- dpdp_scan-0.1.1/README.md +173 -0
- dpdp_scan-0.1.1/pyproject.toml +72 -0
- dpdp_scan-0.1.1/setup.cfg +4 -0
- dpdp_scan-0.1.1/src/dpdp_scan/__init__.py +15 -0
- dpdp_scan-0.1.1/src/dpdp_scan/allow.py +32 -0
- dpdp_scan-0.1.1/src/dpdp_scan/baseline.py +75 -0
- dpdp_scan-0.1.1/src/dpdp_scan/bench/__init__.py +293 -0
- dpdp_scan-0.1.1/src/dpdp_scan/bench/__main__.py +43 -0
- dpdp_scan-0.1.1/src/dpdp_scan/catalogue.py +165 -0
- dpdp_scan-0.1.1/src/dpdp_scan/cli.py +244 -0
- dpdp_scan-0.1.1/src/dpdp_scan/config.py +162 -0
- dpdp_scan-0.1.1/src/dpdp_scan/detectors/__init__.py +76 -0
- dpdp_scan-0.1.1/src/dpdp_scan/detectors/allowlist.py +77 -0
- dpdp_scan-0.1.1/src/dpdp_scan/detectors/base.py +94 -0
- dpdp_scan-0.1.1/src/dpdp_scan/detectors/checksums.py +76 -0
- dpdp_scan-0.1.1/src/dpdp_scan/detectors/india.py +452 -0
- dpdp_scan-0.1.1/src/dpdp_scan/engine.py +84 -0
- dpdp_scan-0.1.1/src/dpdp_scan/masking.py +73 -0
- dpdp_scan-0.1.1/src/dpdp_scan/model.py +148 -0
- dpdp_scan-0.1.1/src/dpdp_scan/output/__init__.py +7 -0
- dpdp_scan-0.1.1/src/dpdp_scan/output/inventory.py +119 -0
- dpdp_scan-0.1.1/src/dpdp_scan/output/markdown.py +72 -0
- dpdp_scan-0.1.1/src/dpdp_scan/output/sarif.py +162 -0
- dpdp_scan-0.1.1/src/dpdp_scan/rules/dpdpa.yml +261 -0
- dpdp_scan-0.1.1/src/dpdp_scan/schema/__init__.py +68 -0
- dpdp_scan-0.1.1/src/dpdp_scan/schema/lexicon.py +365 -0
- dpdp_scan-0.1.1/src/dpdp_scan/schema/parsers.py +240 -0
- dpdp_scan-0.1.1/src/dpdp_scan/semgrep_findings.py +120 -0
- dpdp_scan-0.1.1/src/dpdp_scan/semgrep_runner.py +184 -0
- dpdp_scan-0.1.1/src/dpdp_scan/walker.py +183 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/PKG-INFO +203 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/SOURCES.txt +51 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/dependency_links.txt +1 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/entry_points.txt +2 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/requires.txt +6 -0
- dpdp_scan-0.1.1/src/dpdp_scan.egg-info/top_level.txt +1 -0
- dpdp_scan-0.1.1/tests/test_action.py +51 -0
- dpdp_scan-0.1.1/tests/test_bench.py +77 -0
- dpdp_scan-0.1.1/tests/test_checksums.py +53 -0
- dpdp_scan-0.1.1/tests/test_cli.py +41 -0
- dpdp_scan-0.1.1/tests/test_config_baseline.py +235 -0
- dpdp_scan-0.1.1/tests/test_detectors.py +287 -0
- dpdp_scan-0.1.1/tests/test_engine.py +25 -0
- dpdp_scan-0.1.1/tests/test_lexicon.py +128 -0
- dpdp_scan-0.1.1/tests/test_masking.py +71 -0
- dpdp_scan-0.1.1/tests/test_model.py +92 -0
- dpdp_scan-0.1.1/tests/test_output.py +184 -0
- dpdp_scan-0.1.1/tests/test_schema.py +191 -0
- dpdp_scan-0.1.1/tests/test_semgrep.py +176 -0
- dpdp_scan-0.1.1/tests/test_walker.py +102 -0
dpdp_scan-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
dpdp_scan-0.1.1/NOTICE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
dpdp-scan
|
|
2
|
+
Copyright 2026 StateCheck Security
|
|
3
|
+
|
|
4
|
+
This product includes software developed by StateCheck Security
|
|
5
|
+
(https://statechecksecurity.com).
|
|
6
|
+
|
|
7
|
+
Portions of this software are ported from Paranoid
|
|
8
|
+
(https://github.com/theAstiv/paranoid), Copyright 2025-2026 Astitva,
|
|
9
|
+
licensed under the Apache License, Version 2.0: the Semgrep subprocess
|
|
10
|
+
runner and the SARIF 2.1.0 exporter.
|
|
11
|
+
|
|
12
|
+
The Semgrep rules and the personal-data field lexicon are developed
|
|
13
|
+
alongside the DPDPA Engineering Kit
|
|
14
|
+
(https://github.com/statecheck-security/dpdpa-engineering-kit),
|
|
15
|
+
Copyright 2026 StateCheck Security, Apache License, Version 2.0.
|
|
16
|
+
|
|
17
|
+
The legal references in this software (sections of the Digital Personal
|
|
18
|
+
Data Protection Act, 2023 and rules of the Digital Personal Data
|
|
19
|
+
Protection Rules, 2025) are pointers for engineers. They are not legal
|
|
20
|
+
advice.
|
dpdp_scan-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dpdp-scan
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Finds Indian personal data (Aadhaar, PAN, GSTIN, UPI, IFSC, mobile) in code, schemas, fixtures and logs, and points each finding at the DPDP Act obligation it touches.
|
|
5
|
+
Author: StateCheck Security
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://statechecksecurity.com
|
|
8
|
+
Project-URL: Repository, https://github.com/statecheck-security/dpdp-scan
|
|
9
|
+
Project-URL: Issues, https://github.com/statecheck-security/dpdp-scan/issues
|
|
10
|
+
Keywords: dpdp-act,dpdpa,india,privacy,pii,aadhaar,pan,gstin,sarif,semgrep,devsecops,data-discovery
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
License-File: NOTICE
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.14; extra == "dev"
|
|
28
|
+
Requires-Dist: jsonschema>=4.23; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# dpdp-scan
|
|
32
|
+
|
|
33
|
+
Finds Indian personal data in code, schemas, fixtures and logs, and points each finding
|
|
34
|
+
at the obligation under India's Digital Personal Data Protection Act, 2023 and the DPDP
|
|
35
|
+
Rules, 2025 that it touches. A CLI and a GitHub Action, built to run in CI.
|
|
36
|
+
|
|
37
|
+
**Status:** v0.1.0 (6 November 2026). Value detectors, schema classifier, Semgrep rule
|
|
38
|
+
pack, SARIF/JSON/Markdown outputs, config, baseline, a GitHub Action and a Docker image.
|
|
39
|
+
See [CHANGELOG.md](CHANGELOG.md); the build plan is in [`.claude/PLAN.md`](.claude/PLAN.md).
|
|
40
|
+
Try it on [DVDPA](https://github.com/statecheck-security/dvdpa), a deliberately leaky demo app.
|
|
41
|
+
|
|
42
|
+
> **Not legal advice.** dpdp-scan reports where personal data appears and which
|
|
43
|
+
> obligation it engages. It gives no compliance verdict. Whether a finding matters
|
|
44
|
+
> depends on your processing, your contracts and how the Data Protection Board reads
|
|
45
|
+
> the Rules.
|
|
46
|
+
|
|
47
|
+
## What it does
|
|
48
|
+
|
|
49
|
+
| Part | What | Why it matters |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| Validated detectors | Aadhaar (Verhoeff checksum, first digit 2–9), PAN (holder-type character), GSTIN (mod-36 check character, state code, embedded PAN), IFSC, UPI VPA (known PSP handles), Indian mobile numbers, voter EPIC, passport, driving licence, email | Checksums are what keep false positives down. A 12-digit order id is not an Aadhaar. |
|
|
52
|
+
| Schema classifier | SQL DDL and migrations, Prisma, OpenAPI / JSON Schema; a field-name lexicon that knows `aadhar_no`, `pan_no`, `mob_no`, `dob`, `father_name` | Most personal data in a repo is declared, not written out. The inventory starts here. |
|
|
53
|
+
| Semgrep rule pack | Personal data written to logs; personal data sent to analytics SDKs; age or DOB collected with no age gate nearby (a Section 9 signal) | The rules are plain YAML you can read, test and extend. |
|
|
54
|
+
| Outputs | SARIF 2.1.0 for GitHub code scanning, a JSON data inventory, a Markdown summary | SARIF puts findings in the Security tab; the inventory seeds a data map or RoPA. |
|
|
55
|
+
| CI ergonomics | `.dpdp-scan.yml`, a baseline file to accept existing findings, `--fail-on`, documented exit codes, a pre-commit hook | The gitleaks shape: drop it in, it only fails on what is new. |
|
|
56
|
+
|
|
57
|
+
**Masking is a ground rule.** Every report, log line and SARIF snippet masks matched
|
|
58
|
+
values (at most the last four characters). The scanner must never move an Aadhaar number
|
|
59
|
+
from a repository into a CI log. A test fails the build if any raw value reaches an output.
|
|
60
|
+
|
|
61
|
+
**Not in v0.1:** cross-service data-flow mapping, free-text NER (an optional Presidio
|
|
62
|
+
plug-in later), databases or live systems (it scans repositories only), any compliance
|
|
63
|
+
score or verdict.
|
|
64
|
+
|
|
65
|
+
## Precision and recall
|
|
66
|
+
|
|
67
|
+
Measured on a synthetic, labelled corpus that the benchmark generates (no real identifier
|
|
68
|
+
is stored anywhere). Numbers are k/N with the misses named, so they can be checked and so
|
|
69
|
+
nobody has to write "detects all Aadhaar numbers".
|
|
70
|
+
|
|
71
|
+
**Precision and recall on the synthetic benchmark (2026-11-06, commit 82ab268).** `python -m dpdp_scan.bench`, seed 20261106, 200 per class.
|
|
72
|
+
|
|
73
|
+
| Detector | Recall (found / positives) | Precision (true / fired) | Misses | False hits |
|
|
74
|
+
|---|---:|---:|---|---|
|
|
75
|
+
| `email` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
76
|
+
| `in_aadhaar` | 200/200 (100%) | 200/236 (85%) | none | order_id_prefixed 21, random_12_digits 15 |
|
|
77
|
+
| `in_driving_licence` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
78
|
+
| `in_gstin` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
79
|
+
| `in_ifsc` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
80
|
+
| `in_mobile` | 200/200 (100%) | 200/299 (67%) | none | random_10_digits 99 |
|
|
81
|
+
| `in_pan` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
82
|
+
| `in_passport` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
83
|
+
| `in_upi` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
84
|
+
| `in_voter_epic` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
85
|
+
|
|
86
|
+
Recall counts a positive as found at any confidence. Precision counts every firing on a
|
|
87
|
+
negative as a false hit, including the ones the detector itself marks LOW. Two floors are
|
|
88
|
+
structural: about one random 12-digit number in ten passes the Verhoeff checksum, and four
|
|
89
|
+
random 10-digit numbers in nine start with 6 to 9 and so look like a mobile number. Both are
|
|
90
|
+
reported at reduced confidence (MEDIUM with an order-id context, LOW for a bare ten digits),
|
|
91
|
+
and field names are what lift real values above them. The corpus does not yet contain
|
|
92
|
+
real-world text with Indian names, addresses or Hinglish, so these numbers are an upper
|
|
93
|
+
bound on synthetic data, not a claim about your repository.
|
|
94
|
+
|
|
95
|
+
## How it compares
|
|
96
|
+
|
|
97
|
+
Checked on 5 November 2026 against each project's repository.
|
|
98
|
+
|
|
99
|
+
| Project | Indian identifiers with checksums | Scans code, schemas, logs | Readable rules | SARIF + Action | Licence |
|
|
100
|
+
|---|---|---|---|---|---|
|
|
101
|
+
| **dpdp-scan** (v0.1 target) | yes | yes | yes (Semgrep YAML) | yes | Apache-2.0 |
|
|
102
|
+
| [Privado](https://github.com/Privado-Inc/privado) | no | code data-flow (Joern) | partial | no SARIF | LGPL-3.0 |
|
|
103
|
+
| [Bearer CLI](https://github.com/Bearer/bearer) | no | code, 122 data types | partial | yes | Elastic 2.0 (not open source) |
|
|
104
|
+
| [Presidio](https://github.com/data-privacy-stack/presidio) | Aadhaar yes; PAN, GSTIN regex only; no UPI, IFSC, mobile | free text | n/a | no | MIT |
|
|
105
|
+
| [VibeDoctor](https://github.com/neural-axis/VibeDoctor) | Aadhaar | code, logs, prompts | no | SARIF, no Action | GPL-3.0 |
|
|
106
|
+
| [Vettam dpdp-compliance-scanner](https://github.com/Vettam/dpdp-compliance-scanner) | not found | JS/TS/Python data map | partial | Action, no SARIF | Apache-2.0 |
|
|
107
|
+
| [truscanner](https://github.com/truconsent/truscanner) | regex, no checksums | code | no | no | MIT |
|
|
108
|
+
| [Scrutora dpdp-scan Action](https://github.com/Scrutora/scrutora-scan) | unknown (closed engine) | code | no | yes | none (engine is not open source) |
|
|
109
|
+
| [gitleaks](https://github.com/gitleaks/gitleaks) | n/a (secrets, not personal data) | code | yes | yes | MIT |
|
|
110
|
+
|
|
111
|
+
Presidio is the engine dpdp-scan builds on for recogniser interfaces; gitleaks is the
|
|
112
|
+
CI experience it copies. The rest are the field.
|
|
113
|
+
|
|
114
|
+
## Install
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pipx install dpdp-scan semgrep # or: pip install dpdp-scan semgrep
|
|
118
|
+
dpdp-scan . # text summary
|
|
119
|
+
dpdp-scan . --format sarif --sarif results.sarif --fail-on high
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Semgrep is optional: without it the value detectors and schema classifier still run and
|
|
123
|
+
the rule pack is skipped with a note. Until the PyPI release lands, install from GitHub:
|
|
124
|
+
`pip install git+https://github.com/statecheck-security/dpdp-scan@v0.1.0`.
|
|
125
|
+
|
|
126
|
+
**GitHub Action.** Findings go to the Security tab as code scanning alerts:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
permissions:
|
|
130
|
+
contents: read
|
|
131
|
+
security-events: write
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/checkout@v5
|
|
134
|
+
- uses: statecheck-security/dpdp-scan@v0.1.0
|
|
135
|
+
with:
|
|
136
|
+
fail-on: high # none | low | medium | high
|
|
137
|
+
# baseline: .dpdp-scan-baseline.json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Docker.** `docker build -t dpdp-scan .` then
|
|
141
|
+
`docker run --rm -v "$PWD:/repo:ro" dpdp-scan /repo --format sarif > results.sarif`.
|
|
142
|
+
|
|
143
|
+
## Configuration
|
|
144
|
+
|
|
145
|
+
Put a `.dpdp-scan.yml` in the repository root (or pass `--config FILE`):
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
version: 1
|
|
149
|
+
ignore:
|
|
150
|
+
paths: ["fixtures/", "docs/**/*.md"] # prefixes or globs, repo-relative
|
|
151
|
+
detectors:
|
|
152
|
+
disable: ["in_mobile", "rule:dob-without-age-gate-js"] # ids, or "schema" / "rules"
|
|
153
|
+
allow:
|
|
154
|
+
domains: ["example-company.in"] # your own mailboxes are not findings
|
|
155
|
+
values_sha256: ["<sha256>"] # from `dpdp-scan --hash-value VALUE`; never the value
|
|
156
|
+
fail_on: medium # default for --fail-on
|
|
157
|
+
baseline: .dpdp-scan-baseline.json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Values are allowlisted by hash so the config never holds the value itself. Unknown keys are
|
|
161
|
+
errors: a typo must not silently switch a check off.
|
|
162
|
+
|
|
163
|
+
**Baseline.** `dpdp-scan --write-baseline .dpdp-scan-baseline.json` records a fingerprint
|
|
164
|
+
for every current finding (detector, path, line and masked evidence; no values). With
|
|
165
|
+
`--baseline` or the config's `baseline`, those findings are dropped and CI fails only on
|
|
166
|
+
what is new.
|
|
167
|
+
|
|
168
|
+
**Exit codes.**
|
|
169
|
+
|
|
170
|
+
| Code | Meaning |
|
|
171
|
+
|---|---|
|
|
172
|
+
| 0 | Scan completed; no finding at or above `--fail-on` (default `none`: never fail) |
|
|
173
|
+
| 1 | Scan completed; a finding is at or above `--fail-on`, or in a `--fail-on-category` |
|
|
174
|
+
| 2 | Scan did not complete: bad arguments, unreadable path, invalid config or baseline |
|
|
175
|
+
|
|
176
|
+
Semgrep being absent is not an error: the rule pack is skipped, a note goes to stderr, and
|
|
177
|
+
the SARIF carries a tool notification.
|
|
178
|
+
|
|
179
|
+
## Development
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
183
|
+
pip install -e ".[dev]"
|
|
184
|
+
ruff check . && ruff format --check . && pytest
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
CI runs the same on Ubuntu and Windows for Python 3.12 and 3.13.
|
|
188
|
+
|
|
189
|
+
## Related
|
|
190
|
+
|
|
191
|
+
- [DPDPA Engineering Kit](https://github.com/statecheck-security/dpdpa-engineering-kit):
|
|
192
|
+
tested code for consent, breach notification, encryption, residency and CI privacy
|
|
193
|
+
gates. The Semgrep rules and the field lexicon here grow out of its `ci-cd/` folder.
|
|
194
|
+
- [Paranoid](https://github.com/theAstiv/paranoid): threat modelling with LLMs. The
|
|
195
|
+
Semgrep runner and SARIF exporter are ported from it (see `NOTICE`).
|
|
196
|
+
- [DPDPA checklist for small companies](https://statechecksecurity.com/dpdpa) and the
|
|
197
|
+
free [DPDP Gap Identifier](https://statechecksecurity.com/dpdpa/gap-identifier).
|
|
198
|
+
|
|
199
|
+
## Licence
|
|
200
|
+
|
|
201
|
+
Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
202
|
+
|
|
203
|
+
Built by [StateCheck Security](https://statechecksecurity.com).
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# dpdp-scan
|
|
2
|
+
|
|
3
|
+
Finds Indian personal data in code, schemas, fixtures and logs, and points each finding
|
|
4
|
+
at the obligation under India's Digital Personal Data Protection Act, 2023 and the DPDP
|
|
5
|
+
Rules, 2025 that it touches. A CLI and a GitHub Action, built to run in CI.
|
|
6
|
+
|
|
7
|
+
**Status:** v0.1.0 (6 November 2026). Value detectors, schema classifier, Semgrep rule
|
|
8
|
+
pack, SARIF/JSON/Markdown outputs, config, baseline, a GitHub Action and a Docker image.
|
|
9
|
+
See [CHANGELOG.md](CHANGELOG.md); the build plan is in [`.claude/PLAN.md`](.claude/PLAN.md).
|
|
10
|
+
Try it on [DVDPA](https://github.com/statecheck-security/dvdpa), a deliberately leaky demo app.
|
|
11
|
+
|
|
12
|
+
> **Not legal advice.** dpdp-scan reports where personal data appears and which
|
|
13
|
+
> obligation it engages. It gives no compliance verdict. Whether a finding matters
|
|
14
|
+
> depends on your processing, your contracts and how the Data Protection Board reads
|
|
15
|
+
> the Rules.
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
| Part | What | Why it matters |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Validated detectors | Aadhaar (Verhoeff checksum, first digit 2–9), PAN (holder-type character), GSTIN (mod-36 check character, state code, embedded PAN), IFSC, UPI VPA (known PSP handles), Indian mobile numbers, voter EPIC, passport, driving licence, email | Checksums are what keep false positives down. A 12-digit order id is not an Aadhaar. |
|
|
22
|
+
| Schema classifier | SQL DDL and migrations, Prisma, OpenAPI / JSON Schema; a field-name lexicon that knows `aadhar_no`, `pan_no`, `mob_no`, `dob`, `father_name` | Most personal data in a repo is declared, not written out. The inventory starts here. |
|
|
23
|
+
| Semgrep rule pack | Personal data written to logs; personal data sent to analytics SDKs; age or DOB collected with no age gate nearby (a Section 9 signal) | The rules are plain YAML you can read, test and extend. |
|
|
24
|
+
| Outputs | SARIF 2.1.0 for GitHub code scanning, a JSON data inventory, a Markdown summary | SARIF puts findings in the Security tab; the inventory seeds a data map or RoPA. |
|
|
25
|
+
| CI ergonomics | `.dpdp-scan.yml`, a baseline file to accept existing findings, `--fail-on`, documented exit codes, a pre-commit hook | The gitleaks shape: drop it in, it only fails on what is new. |
|
|
26
|
+
|
|
27
|
+
**Masking is a ground rule.** Every report, log line and SARIF snippet masks matched
|
|
28
|
+
values (at most the last four characters). The scanner must never move an Aadhaar number
|
|
29
|
+
from a repository into a CI log. A test fails the build if any raw value reaches an output.
|
|
30
|
+
|
|
31
|
+
**Not in v0.1:** cross-service data-flow mapping, free-text NER (an optional Presidio
|
|
32
|
+
plug-in later), databases or live systems (it scans repositories only), any compliance
|
|
33
|
+
score or verdict.
|
|
34
|
+
|
|
35
|
+
## Precision and recall
|
|
36
|
+
|
|
37
|
+
Measured on a synthetic, labelled corpus that the benchmark generates (no real identifier
|
|
38
|
+
is stored anywhere). Numbers are k/N with the misses named, so they can be checked and so
|
|
39
|
+
nobody has to write "detects all Aadhaar numbers".
|
|
40
|
+
|
|
41
|
+
**Precision and recall on the synthetic benchmark (2026-11-06, commit 82ab268).** `python -m dpdp_scan.bench`, seed 20261106, 200 per class.
|
|
42
|
+
|
|
43
|
+
| Detector | Recall (found / positives) | Precision (true / fired) | Misses | False hits |
|
|
44
|
+
|---|---:|---:|---|---|
|
|
45
|
+
| `email` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
46
|
+
| `in_aadhaar` | 200/200 (100%) | 200/236 (85%) | none | order_id_prefixed 21, random_12_digits 15 |
|
|
47
|
+
| `in_driving_licence` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
48
|
+
| `in_gstin` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
49
|
+
| `in_ifsc` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
50
|
+
| `in_mobile` | 200/200 (100%) | 200/299 (67%) | none | random_10_digits 99 |
|
|
51
|
+
| `in_pan` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
52
|
+
| `in_passport` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
53
|
+
| `in_upi` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
54
|
+
| `in_voter_epic` | 200/200 (100%) | 200/200 (100%) | none | none |
|
|
55
|
+
|
|
56
|
+
Recall counts a positive as found at any confidence. Precision counts every firing on a
|
|
57
|
+
negative as a false hit, including the ones the detector itself marks LOW. Two floors are
|
|
58
|
+
structural: about one random 12-digit number in ten passes the Verhoeff checksum, and four
|
|
59
|
+
random 10-digit numbers in nine start with 6 to 9 and so look like a mobile number. Both are
|
|
60
|
+
reported at reduced confidence (MEDIUM with an order-id context, LOW for a bare ten digits),
|
|
61
|
+
and field names are what lift real values above them. The corpus does not yet contain
|
|
62
|
+
real-world text with Indian names, addresses or Hinglish, so these numbers are an upper
|
|
63
|
+
bound on synthetic data, not a claim about your repository.
|
|
64
|
+
|
|
65
|
+
## How it compares
|
|
66
|
+
|
|
67
|
+
Checked on 5 November 2026 against each project's repository.
|
|
68
|
+
|
|
69
|
+
| Project | Indian identifiers with checksums | Scans code, schemas, logs | Readable rules | SARIF + Action | Licence |
|
|
70
|
+
|---|---|---|---|---|---|
|
|
71
|
+
| **dpdp-scan** (v0.1 target) | yes | yes | yes (Semgrep YAML) | yes | Apache-2.0 |
|
|
72
|
+
| [Privado](https://github.com/Privado-Inc/privado) | no | code data-flow (Joern) | partial | no SARIF | LGPL-3.0 |
|
|
73
|
+
| [Bearer CLI](https://github.com/Bearer/bearer) | no | code, 122 data types | partial | yes | Elastic 2.0 (not open source) |
|
|
74
|
+
| [Presidio](https://github.com/data-privacy-stack/presidio) | Aadhaar yes; PAN, GSTIN regex only; no UPI, IFSC, mobile | free text | n/a | no | MIT |
|
|
75
|
+
| [VibeDoctor](https://github.com/neural-axis/VibeDoctor) | Aadhaar | code, logs, prompts | no | SARIF, no Action | GPL-3.0 |
|
|
76
|
+
| [Vettam dpdp-compliance-scanner](https://github.com/Vettam/dpdp-compliance-scanner) | not found | JS/TS/Python data map | partial | Action, no SARIF | Apache-2.0 |
|
|
77
|
+
| [truscanner](https://github.com/truconsent/truscanner) | regex, no checksums | code | no | no | MIT |
|
|
78
|
+
| [Scrutora dpdp-scan Action](https://github.com/Scrutora/scrutora-scan) | unknown (closed engine) | code | no | yes | none (engine is not open source) |
|
|
79
|
+
| [gitleaks](https://github.com/gitleaks/gitleaks) | n/a (secrets, not personal data) | code | yes | yes | MIT |
|
|
80
|
+
|
|
81
|
+
Presidio is the engine dpdp-scan builds on for recogniser interfaces; gitleaks is the
|
|
82
|
+
CI experience it copies. The rest are the field.
|
|
83
|
+
|
|
84
|
+
## Install
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pipx install dpdp-scan semgrep # or: pip install dpdp-scan semgrep
|
|
88
|
+
dpdp-scan . # text summary
|
|
89
|
+
dpdp-scan . --format sarif --sarif results.sarif --fail-on high
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Semgrep is optional: without it the value detectors and schema classifier still run and
|
|
93
|
+
the rule pack is skipped with a note. Until the PyPI release lands, install from GitHub:
|
|
94
|
+
`pip install git+https://github.com/statecheck-security/dpdp-scan@v0.1.0`.
|
|
95
|
+
|
|
96
|
+
**GitHub Action.** Findings go to the Security tab as code scanning alerts:
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
permissions:
|
|
100
|
+
contents: read
|
|
101
|
+
security-events: write
|
|
102
|
+
steps:
|
|
103
|
+
- uses: actions/checkout@v5
|
|
104
|
+
- uses: statecheck-security/dpdp-scan@v0.1.0
|
|
105
|
+
with:
|
|
106
|
+
fail-on: high # none | low | medium | high
|
|
107
|
+
# baseline: .dpdp-scan-baseline.json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Docker.** `docker build -t dpdp-scan .` then
|
|
111
|
+
`docker run --rm -v "$PWD:/repo:ro" dpdp-scan /repo --format sarif > results.sarif`.
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
Put a `.dpdp-scan.yml` in the repository root (or pass `--config FILE`):
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
version: 1
|
|
119
|
+
ignore:
|
|
120
|
+
paths: ["fixtures/", "docs/**/*.md"] # prefixes or globs, repo-relative
|
|
121
|
+
detectors:
|
|
122
|
+
disable: ["in_mobile", "rule:dob-without-age-gate-js"] # ids, or "schema" / "rules"
|
|
123
|
+
allow:
|
|
124
|
+
domains: ["example-company.in"] # your own mailboxes are not findings
|
|
125
|
+
values_sha256: ["<sha256>"] # from `dpdp-scan --hash-value VALUE`; never the value
|
|
126
|
+
fail_on: medium # default for --fail-on
|
|
127
|
+
baseline: .dpdp-scan-baseline.json
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Values are allowlisted by hash so the config never holds the value itself. Unknown keys are
|
|
131
|
+
errors: a typo must not silently switch a check off.
|
|
132
|
+
|
|
133
|
+
**Baseline.** `dpdp-scan --write-baseline .dpdp-scan-baseline.json` records a fingerprint
|
|
134
|
+
for every current finding (detector, path, line and masked evidence; no values). With
|
|
135
|
+
`--baseline` or the config's `baseline`, those findings are dropped and CI fails only on
|
|
136
|
+
what is new.
|
|
137
|
+
|
|
138
|
+
**Exit codes.**
|
|
139
|
+
|
|
140
|
+
| Code | Meaning |
|
|
141
|
+
|---|---|
|
|
142
|
+
| 0 | Scan completed; no finding at or above `--fail-on` (default `none`: never fail) |
|
|
143
|
+
| 1 | Scan completed; a finding is at or above `--fail-on`, or in a `--fail-on-category` |
|
|
144
|
+
| 2 | Scan did not complete: bad arguments, unreadable path, invalid config or baseline |
|
|
145
|
+
|
|
146
|
+
Semgrep being absent is not an error: the rule pack is skipped, a note goes to stderr, and
|
|
147
|
+
the SARIF carries a tool notification.
|
|
148
|
+
|
|
149
|
+
## Development
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
python -m venv .venv && . .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
153
|
+
pip install -e ".[dev]"
|
|
154
|
+
ruff check . && ruff format --check . && pytest
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
CI runs the same on Ubuntu and Windows for Python 3.12 and 3.13.
|
|
158
|
+
|
|
159
|
+
## Related
|
|
160
|
+
|
|
161
|
+
- [DPDPA Engineering Kit](https://github.com/statecheck-security/dpdpa-engineering-kit):
|
|
162
|
+
tested code for consent, breach notification, encryption, residency and CI privacy
|
|
163
|
+
gates. The Semgrep rules and the field lexicon here grow out of its `ci-cd/` folder.
|
|
164
|
+
- [Paranoid](https://github.com/theAstiv/paranoid): threat modelling with LLMs. The
|
|
165
|
+
Semgrep runner and SARIF exporter are ported from it (see `NOTICE`).
|
|
166
|
+
- [DPDPA checklist for small companies](https://statechecksecurity.com/dpdpa) and the
|
|
167
|
+
free [DPDP Gap Identifier](https://statechecksecurity.com/dpdpa/gap-identifier).
|
|
168
|
+
|
|
169
|
+
## Licence
|
|
170
|
+
|
|
171
|
+
Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
172
|
+
|
|
173
|
+
Built by [StateCheck Security](https://statechecksecurity.com).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dpdp-scan"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Finds Indian personal data (Aadhaar, PAN, GSTIN, UPI, IFSC, mobile) in code, schemas, fixtures and logs, and points each finding at the DPDP Act obligation it touches."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
authors = [{ name = "StateCheck Security" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"dpdp-act",
|
|
15
|
+
"dpdpa",
|
|
16
|
+
"india",
|
|
17
|
+
"privacy",
|
|
18
|
+
"pii",
|
|
19
|
+
"aadhaar",
|
|
20
|
+
"pan",
|
|
21
|
+
"gstin",
|
|
22
|
+
"sarif",
|
|
23
|
+
"semgrep",
|
|
24
|
+
"devsecops",
|
|
25
|
+
"data-discovery",
|
|
26
|
+
]
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
29
|
+
"Environment :: Console",
|
|
30
|
+
"Intended Audience :: Developers",
|
|
31
|
+
"Operating System :: OS Independent",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Programming Language :: Python :: 3.13",
|
|
35
|
+
"Topic :: Security",
|
|
36
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
37
|
+
]
|
|
38
|
+
dependencies = ["pyyaml>=6.0"]
|
|
39
|
+
|
|
40
|
+
[project.optional-dependencies]
|
|
41
|
+
dev = ["pytest>=8", "ruff>=0.14", "jsonschema>=4.23"]
|
|
42
|
+
|
|
43
|
+
[project.scripts]
|
|
44
|
+
dpdp-scan = "dpdp_scan.cli:main"
|
|
45
|
+
|
|
46
|
+
[project.urls]
|
|
47
|
+
Homepage = "https://statechecksecurity.com"
|
|
48
|
+
Repository = "https://github.com/statecheck-security/dpdp-scan"
|
|
49
|
+
Issues = "https://github.com/statecheck-security/dpdp-scan/issues"
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.packages.find]
|
|
52
|
+
where = ["src"]
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.package-data]
|
|
55
|
+
dpdp_scan = ["rules/*.yml"]
|
|
56
|
+
|
|
57
|
+
[tool.pytest.ini_options]
|
|
58
|
+
testpaths = ["tests"]
|
|
59
|
+
addopts = "-q"
|
|
60
|
+
|
|
61
|
+
[tool.ruff]
|
|
62
|
+
line-length = 100
|
|
63
|
+
target-version = "py312"
|
|
64
|
+
extend-exclude = [".venv", "tests/semgrep"] # Semgrep fixtures are deliberately not valid programs
|
|
65
|
+
|
|
66
|
+
[tool.ruff.lint]
|
|
67
|
+
# Bugs, unused code, import order, bugbear and security checks. No pure-style rules.
|
|
68
|
+
select = ["E", "F", "W", "I", "B", "S", "UP"]
|
|
69
|
+
ignore = ["S101"] # assert is how pytest tests are written
|
|
70
|
+
|
|
71
|
+
[tool.ruff.lint.per-file-ignores]
|
|
72
|
+
"tests/**" = ["S105", "S106", "S311", "S603"] # fixtures, seeded corpus, tests drive git
|