@arsh342/athena 0.4.1 → 0.4.2

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.
package/README.md CHANGED
@@ -111,7 +111,7 @@ The trained detector is enabled only for JavaScript so far; every other language
111
111
  - **Investigation:** entry points and their auth guards, sibling comparison (the one route missing the check its neighbours have), intent versus code, lifecycles, error paths and races. Every finding is checked for reachability, defenses and impact; `low` confidence findings are listed as **needs review** and never block.
112
112
  - **Secrets:** 60+ provider formats, connection strings and private keys in source and config files. Findings never contain the secret.
113
113
  - **Dependencies:** known vulnerabilities (OSV, with CVSS, EPSS and CISA KEV), malicious packages, non-existent packages, typosquats, deprecated or very new releases, install scripts, and hallucinated API calls. Private packages are never looked up, and a registry outage is a coverage gap, not "does not exist".
114
- - **AI provenance:** lines credited to AI tools in git history (a floor) plus a style-based estimate, shown as a range with its method. The trained detector (`athena-detect-fast`) is enabled for a language only when it meets its release targets on a held-out benchmark (human false-positive rate <= 5%, F1 >= 0.85, and the same false-positive limit on 2022-era human code); today that is JavaScript only, and every other language uses a labelled style heuristic. Results: [docs/athena-bench/RESULTS.md](https://github.com/arsh342/athena/blob/main/docs/athena-bench/RESULTS.md).
114
+ - **AI provenance:** lines credited to AI tools in git history (a floor) plus a style-based estimate, shown as a range with its method. The trained detector (`athena-detect-fast`) is enabled for a language only when it meets its release targets on a held-out benchmark (human false-positive rate <= 5%, F1 >= 0.85, and the same false-positive limit on 2022-era human code); today that is JavaScript and TypeScript, and every other language uses a labelled style heuristic. Results: [docs/athena-bench/RESULTS.md](https://github.com/arsh342/athena/blob/main/docs/athena-bench/RESULTS.md).
115
115
 
116
116
  Syntax-error files are reported as `parse-failed` in coverage and their readable parts are still analyzed.
117
117
 
package/dist/index.cjs CHANGED
@@ -295396,7 +295396,7 @@ init_cjs_shims();
295396
295396
  // package.json
295397
295397
  var package_default = {
295398
295398
  name: "@arsh342/athena",
295399
- version: "0.4.1",
295399
+ version: "0.4.2",
295400
295400
  description: "AI code provenance tracker and terminal scanner for JavaScript/TypeScript, Python, Java, C#, C/C++, Go, Rust, PHP and Shell repositories.",
295401
295401
  type: "module",
295402
295402
  bin: {
Binary file
@@ -1,63 +1,59 @@
1
1
  {
2
2
  "benchmark": {
3
- "C": 8.0,
3
+ "C": 2.0,
4
4
  "classes": [
5
5
  "human",
6
6
  "ai",
7
7
  "refined"
8
8
  ],
9
- "collected": "2026-11-20T08:31:56.795077+00:00",
9
+ "collected": "2026-11-20T16:36:51.356520+00:00",
10
10
  "newest": {
11
11
  "c": {
12
- "ai_recall": 0.07894736842105263,
13
- "n": 228
14
- },
15
- "cpp": {
16
- "ai_recall": 0.2807017543859649,
17
- "n": 57
12
+ "ai_recall": 0.21052631578947367,
13
+ "n": 19
18
14
  },
19
15
  "csharp": {
20
- "ai_recall": 0.7028145695364238,
21
- "n": 1208
16
+ "ai_recall": 0.6766917293233082,
17
+ "n": 399
22
18
  },
23
19
  "go": {
24
- "ai_recall": 0.6120527306967984,
25
- "n": 1062
20
+ "ai_recall": 0.5761589403973509,
21
+ "n": 1661
26
22
  },
27
23
  "java": {
28
- "ai_recall": 0.0796812749003984,
29
- "n": 251
24
+ "ai_recall": 0.04263565891472868,
25
+ "n": 258
30
26
  },
31
27
  "javascript": {
32
- "ai_recall": 0.8986784140969163,
33
- "n": 1589
28
+ "ai_recall": 0.9411177644710579,
29
+ "n": 1002
34
30
  },
35
31
  "python": {
36
- "ai_recall": 0.8918341171440787,
37
- "n": 2339
32
+ "ai_recall": 0.9143454038997214,
33
+ "n": 2872
38
34
  },
39
35
  "rust": {
40
- "ai_recall": 0.6355371900826446,
41
- "n": 1210
36
+ "ai_recall": 0.7234691050152396,
37
+ "n": 3609
42
38
  },
43
39
  "shell": {
44
- "ai_recall": 0.44047619047619047,
45
- "n": 84
40
+ "ai_recall": 0.5669291338582677,
41
+ "n": 127
46
42
  },
47
43
  "tsx": {
48
- "ai_recall": 0.7836734693877551,
49
- "n": 490
44
+ "ai_recall": 0.715660542432196,
45
+ "n": 1143
50
46
  },
51
47
  "typescript": {
52
- "ai_recall": 0.7804072647220693,
53
- "n": 1817
48
+ "ai_recall": 0.7454682779456193,
49
+ "n": 5296
54
50
  }
55
51
  },
56
52
  "split_sizes": {
57
- "dev": 11231,
58
- "newest": 10335,
59
- "test": 7991,
60
- "train": 78938
53
+ "dev": 13235,
54
+ "newest": 16386,
55
+ "test": 10389,
56
+ "train": 100997
61
57
  }
62
58
  },
63
59
  "classes": [
@@ -69,35 +65,35 @@
69
65
  "languages": {
70
66
  "c": {
71
67
  "enabled": false,
72
- "reason": "too little test data (62 human / 0 ai)",
68
+ "reason": "too few distinct repositories in the test split (2 human / 1 ai, need 5 each)",
73
69
  "test": {
74
- "ai_repos": 0,
75
- "ais": 0,
76
- "f1": 0.0,
70
+ "ai_repos": 1,
71
+ "ais": 13,
72
+ "f1": 0.6956521739130435,
77
73
  "fpr": 0.03225806451612903,
78
74
  "human_repos": 2,
79
75
  "humans": 62,
80
76
  "late_humans": 0,
81
- "n": 62,
82
- "precision": 0.0,
83
- "recall": 0.0
77
+ "n": 75,
78
+ "precision": 0.8,
79
+ "recall": 0.6153846153846154
84
80
  },
85
81
  "threshold": 0.5
86
82
  },
87
83
  "cpp": {
88
84
  "enabled": false,
89
- "reason": "too little test data (341 human / 1 ai)",
85
+ "reason": "too few distinct repositories in the test split (3 human / 2 ai, need 5 each)",
90
86
  "test": {
91
- "ai_repos": 1,
92
- "ais": 1,
93
- "f1": 0.1111111111111111,
94
- "fpr": 0.0469208211143695,
87
+ "ai_repos": 2,
88
+ "ais": 47,
89
+ "f1": 0.7346938775510204,
90
+ "fpr": 0.04398826979472141,
95
91
  "human_repos": 3,
96
92
  "humans": 341,
97
93
  "late_humans": 0,
98
- "n": 342,
99
- "precision": 0.058823529411764705,
100
- "recall": 1.0
94
+ "n": 388,
95
+ "precision": 0.7058823529411765,
96
+ "recall": 0.7659574468085106
101
97
  },
102
98
  "threshold": 0.5
103
99
  },
@@ -107,32 +103,32 @@
107
103
  "test": {
108
104
  "ai_repos": 1,
109
105
  "ais": 3,
110
- "f1": 0.0,
106
+ "f1": 0.2,
111
107
  "fpr": 0.01507537688442211,
112
108
  "human_repos": 2,
113
109
  "humans": 398,
114
110
  "late_humans": 0,
115
111
  "n": 401,
116
- "precision": 0.0,
117
- "recall": 0.0
112
+ "precision": 0.14285714285714285,
113
+ "recall": 0.3333333333333333
118
114
  },
119
- "threshold": 0.7
115
+ "threshold": 0.78
120
116
  },
121
117
  "go": {
122
118
  "enabled": false,
123
- "reason": "too few distinct repositories in the test split (2 human / 2 ai, need 5 each)",
119
+ "reason": "too few distinct repositories in the test split (2 human / 3 ai, need 5 each)",
124
120
  "test": {
125
- "ai_repos": 2,
126
- "ais": 495,
127
- "f1": 0.7363057324840764,
128
- "fpr": 0.004149377593360996,
121
+ "ai_repos": 3,
122
+ "ais": 864,
123
+ "f1": 0.8623613829093281,
124
+ "fpr": 0.03319502074688797,
129
125
  "human_repos": 2,
130
126
  "humans": 241,
131
127
  "late_fpr": 0.0,
132
128
  "late_humans": 42,
133
- "n": 736,
134
- "precision": 0.996551724137931,
135
- "recall": 0.5838383838383838
129
+ "n": 1105,
130
+ "precision": 0.9880418535127056,
131
+ "recall": 0.7650462962962963
136
132
  },
137
133
  "threshold": 0.5
138
134
  },
@@ -143,7 +139,7 @@
143
139
  "ai_repos": 0,
144
140
  "ais": 0,
145
141
  "f1": 0.0,
146
- "fpr": 0.0,
142
+ "fpr": 0.0026595744680851063,
147
143
  "human_repos": 4,
148
144
  "humans": 376,
149
145
  "late_humans": 0,
@@ -157,19 +153,19 @@
157
153
  "enabled": true,
158
154
  "reason": "meets release targets",
159
155
  "test": {
160
- "ai_repos": 7,
161
- "ais": 931,
162
- "f1": 0.9318435754189944,
163
- "fpr": 0.032133676092544985,
156
+ "ai_repos": 11,
157
+ "ais": 1109,
158
+ "f1": 0.9390815370196813,
159
+ "fpr": 0.02956298200514139,
164
160
  "human_repos": 9,
165
161
  "humans": 778,
166
- "late_fpr": 0.0475,
162
+ "late_fpr": 0.0425,
167
163
  "late_humans": 400,
168
- "n": 1709,
169
- "precision": 0.9708963911525029,
170
- "recall": 0.8958109559613319
164
+ "n": 1887,
165
+ "precision": 0.9775609756097561,
166
+ "recall": 0.9035166816952209
171
167
  },
172
- "threshold": 0.56
168
+ "threshold": 0.72
173
169
  },
174
170
  "php": {
175
171
  "enabled": false,
@@ -191,97 +187,97 @@
191
187
  },
192
188
  "python": {
193
189
  "enabled": false,
194
- "reason": "too few distinct repositories in the test split (7 human / 4 ai, need 5 each)",
190
+ "reason": "human false-positive rate 13.3% > 5%",
195
191
  "test": {
196
- "ai_repos": 4,
197
- "ais": 588,
198
- "f1": 0.9026548672566372,
199
- "fpr": 0.14242424242424243,
192
+ "ai_repos": 7,
193
+ "ais": 1240,
194
+ "f1": 0.9460317460317461,
195
+ "fpr": 0.13333333333333333,
200
196
  "human_repos": 7,
201
197
  "humans": 660,
202
- "late_fpr": 0.014285714285714285,
198
+ "late_fpr": 0.007142857142857143,
203
199
  "late_humans": 140,
204
- "n": 1248,
205
- "precision": 0.8564885496183207,
206
- "recall": 0.9540816326530612
200
+ "n": 1900,
201
+ "precision": 0.93125,
202
+ "recall": 0.9612903225806452
207
203
  },
208
- "threshold": 0.61
204
+ "threshold": 0.69
209
205
  },
210
206
  "rust": {
211
207
  "enabled": false,
212
- "reason": "too few distinct repositories in the test split (2 human / 3 ai, need 5 each)",
208
+ "reason": "too few distinct repositories in the test split (2 human / 5 ai, need 5 each)",
213
209
  "test": {
214
- "ai_repos": 3,
215
- "ais": 472,
216
- "f1": 0.7365661861074705,
217
- "fpr": 0.02518891687657431,
210
+ "ai_repos": 5,
211
+ "ais": 819,
212
+ "f1": 0.5677308024158757,
213
+ "fpr": 0.027707808564231738,
218
214
  "human_repos": 2,
219
215
  "humans": 397,
220
216
  "late_fpr": 0.01507537688442211,
221
217
  "late_humans": 199,
222
- "n": 869,
223
- "precision": 0.9656357388316151,
224
- "recall": 0.5953389830508474
218
+ "n": 1216,
219
+ "precision": 0.9676470588235294,
220
+ "recall": 0.4017094017094017
225
221
  },
226
- "threshold": 0.59
222
+ "threshold": 0.71
227
223
  },
228
224
  "shell": {
229
225
  "enabled": false,
230
- "reason": "too few distinct repositories in the test split (3 human / 3 ai, need 5 each)",
226
+ "reason": "too few distinct repositories in the test split (3 human / 4 ai, need 5 each)",
231
227
  "test": {
232
- "ai_repos": 3,
233
- "ais": 31,
234
- "f1": 0.7384615384615385,
235
- "fpr": 0.05181347150259067,
228
+ "ai_repos": 4,
229
+ "ais": 33,
230
+ "f1": 0.7222222222222221,
231
+ "fpr": 0.06735751295336788,
236
232
  "human_repos": 3,
237
233
  "humans": 193,
238
- "late_fpr": 0.039473684210526314,
234
+ "late_fpr": 0.06578947368421052,
239
235
  "late_humans": 76,
240
- "n": 224,
241
- "precision": 0.7058823529411765,
242
- "recall": 0.7741935483870968
236
+ "n": 226,
237
+ "precision": 0.6666666666666666,
238
+ "recall": 0.7878787878787878
243
239
  },
244
- "threshold": 0.5
240
+ "threshold": 0.63
245
241
  },
246
242
  "tsx": {
247
243
  "enabled": false,
248
- "reason": "too few distinct repositories in the test split (2 human / 2 ai, need 5 each)",
244
+ "reason": "too few distinct repositories in the test split (2 human / 3 ai, need 5 each)",
249
245
  "test": {
250
- "ai_repos": 2,
251
- "ais": 60,
252
- "f1": 0.8214285714285715,
253
- "fpr": 0.0821917808219178,
246
+ "ai_repos": 3,
247
+ "ais": 96,
248
+ "f1": 0.8571428571428572,
249
+ "fpr": 0.0547945205479452,
254
250
  "human_repos": 2,
255
251
  "humans": 73,
256
- "late_fpr": 0.08695652173913043,
252
+ "late_fpr": 0.057971014492753624,
257
253
  "late_humans": 69,
258
- "n": 133,
259
- "precision": 0.8846153846153846,
260
- "recall": 0.7666666666666667
254
+ "n": 169,
255
+ "precision": 0.9493670886075949,
256
+ "recall": 0.78125
261
257
  },
262
- "threshold": 0.72
258
+ "threshold": 0.81
263
259
  },
264
260
  "typescript": {
265
- "enabled": false,
266
- "reason": "too few distinct repositories in the test split (5 human / 3 ai, need 5 each)",
261
+ "enabled": true,
262
+ "reason": "meets release targets",
267
263
  "test": {
268
- "ai_repos": 3,
269
- "ais": 683,
270
- "f1": 0.8835403726708075,
271
- "fpr": 0.07302231237322515,
264
+ "ai_repos": 5,
265
+ "ais": 1327,
266
+ "f1": 0.8590774439272112,
267
+ "fpr": 0.04259634888438134,
272
268
  "human_repos": 5,
273
269
  "humans": 493,
274
- "late_fpr": 0.0790273556231003,
270
+ "late_fpr": 0.0486322188449848,
275
271
  "late_humans": 329,
276
- "n": 1176,
277
- "precision": 0.9404958677685951,
278
- "recall": 0.8330893118594437
272
+ "n": 1820,
273
+ "precision": 0.9797297297297297,
274
+ "recall": 0.7648831951770911
279
275
  },
280
- "threshold": 0.65
276
+ "threshold": 0.84
281
277
  }
282
278
  },
283
279
  "layout": "f16 weights [class][feature] then f32 biases[class]",
284
280
  "nFeatures": 262188,
285
- "temperature": 1.2787255883660655,
286
- "version": "0.2.0"
281
+ "temperature": 0.9208475269625865,
282
+ "version": "0.2.1"
287
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsh342/athena",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "AI code provenance tracker and terminal scanner for JavaScript/TypeScript, Python, Java, C#, C/C++, Go, Rust, PHP and Shell repositories.",
5
5
  "type": "module",
6
6
  "bin": {