slopbrick 0.34.8 → 0.34.9
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/dist/engine/worker.cjs +11 -4
- package/dist/engine/worker.js +11 -4
- package/dist/index.cjs +12 -5
- package/dist/index.js +12 -5
- package/package.json +1 -1
package/dist/engine/worker.cjs
CHANGED
|
@@ -37142,7 +37142,7 @@ var javaHardcodedCredentialRule = createRule({
|
|
|
37142
37142
|
// src/rules/java/sql-string-concat.ts
|
|
37143
37143
|
var SQL_KEYWORD_REGEX = /\b(?:SELECT|INSERT\s+INTO|UPDATE|DELETE\s+FROM|CREATE\s+TABLE|DROP\s+TABLE|ALTER\s+TABLE)\b/i;
|
|
37144
37144
|
var UNSAFE_REGEX = /\+/;
|
|
37145
|
-
var SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b
|
|
37145
|
+
var SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b|\?)/;
|
|
37146
37146
|
var javaSqlStringConcatRule = createRule({
|
|
37147
37147
|
id: "java/sql-string-concat",
|
|
37148
37148
|
category: "security",
|
|
@@ -37160,7 +37160,14 @@ var javaSqlStringConcatRule = createRule({
|
|
|
37160
37160
|
const lines = source.split("\n");
|
|
37161
37161
|
for (let i = 0; i < lines.length; i++) {
|
|
37162
37162
|
const line = lines[i];
|
|
37163
|
-
|
|
37163
|
+
const keywordMatch = SQL_KEYWORD_REGEX.exec(line);
|
|
37164
|
+
if (!keywordMatch) continue;
|
|
37165
|
+
const keywordIdx = keywordMatch.index;
|
|
37166
|
+
let j = keywordIdx - 1;
|
|
37167
|
+
while (j >= 0 && /\s/.test(line[j])) j--;
|
|
37168
|
+
if (j < 0) continue;
|
|
37169
|
+
const prevChar = line[j];
|
|
37170
|
+
if (prevChar !== '"' && prevChar !== "'" && prevChar !== "=") continue;
|
|
37164
37171
|
if (!UNSAFE_REGEX.test(line)) continue;
|
|
37165
37172
|
if (SAFE_REGEX.test(line)) continue;
|
|
37166
37173
|
issues.push({
|
|
@@ -37171,7 +37178,7 @@ var javaSqlStringConcatRule = createRule({
|
|
|
37171
37178
|
message: `SQL query built via string concat at line ${i + 1}`,
|
|
37172
37179
|
line: i + 1,
|
|
37173
37180
|
column: 1,
|
|
37174
|
-
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.
|
|
37181
|
+
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.34.9 (refined: require SQL keyword to start a string literal; tightened SAFE_REGEX).'
|
|
37175
37182
|
});
|
|
37176
37183
|
}
|
|
37177
37184
|
return issues;
|
|
@@ -45627,7 +45634,7 @@ var signal_strength_default = {
|
|
|
45627
45634
|
precision: 0.0691,
|
|
45628
45635
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45629
45636
|
verdict: "DORMANT",
|
|
45630
|
-
_calibrationNote:
|
|
45637
|
+
_calibrationNote: 'v0.34.9: REFINED \u2014 rule now requires the SQL keyword to be the start of a string literal (preceded by `"`, `\'`, or `=`), and tightened the SAFE_REGEX. Per-file unique v9 Java calibration (81891 neg, 10305 pos): 115 TP files, 1549 FP files, ratio=0.59 (DORMANT). 1664 total fires. The refinement is expected to push precision from 6.9% to 25%+ by removing lines where SELECT/INSERT appears in string values (e.g. `String msg = "Selected 1 row: " + count`). Also tightened SAFE_REGEX from `:??` to `:?` (the original was over-broad). The full v9 re-calibration is part of the broader v0.34.8/v0.34.9 pipeline (same pattern applied to kotlin/sql-string-concat and java/sql-string-concat). INSUFFICIENT_DATA: pos arm 10305 files, below the 10k floor. Era-confounded: pre-2022 Java used JDBC string concat more; modern Java uses PreparedStatement. defaultOff.',
|
|
45631
45638
|
aiSpecific: false,
|
|
45632
45639
|
_v9Verdict: "DORMANT",
|
|
45633
45640
|
_v9Lift: 0.59,
|
package/dist/engine/worker.js
CHANGED
|
@@ -37113,7 +37113,7 @@ var javaHardcodedCredentialRule = createRule({
|
|
|
37113
37113
|
// src/rules/java/sql-string-concat.ts
|
|
37114
37114
|
var SQL_KEYWORD_REGEX = /\b(?:SELECT|INSERT\s+INTO|UPDATE|DELETE\s+FROM|CREATE\s+TABLE|DROP\s+TABLE|ALTER\s+TABLE)\b/i;
|
|
37115
37115
|
var UNSAFE_REGEX = /\+/;
|
|
37116
|
-
var SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b
|
|
37116
|
+
var SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b|\?)/;
|
|
37117
37117
|
var javaSqlStringConcatRule = createRule({
|
|
37118
37118
|
id: "java/sql-string-concat",
|
|
37119
37119
|
category: "security",
|
|
@@ -37131,7 +37131,14 @@ var javaSqlStringConcatRule = createRule({
|
|
|
37131
37131
|
const lines = source.split("\n");
|
|
37132
37132
|
for (let i = 0; i < lines.length; i++) {
|
|
37133
37133
|
const line = lines[i];
|
|
37134
|
-
|
|
37134
|
+
const keywordMatch = SQL_KEYWORD_REGEX.exec(line);
|
|
37135
|
+
if (!keywordMatch) continue;
|
|
37136
|
+
const keywordIdx = keywordMatch.index;
|
|
37137
|
+
let j = keywordIdx - 1;
|
|
37138
|
+
while (j >= 0 && /\s/.test(line[j])) j--;
|
|
37139
|
+
if (j < 0) continue;
|
|
37140
|
+
const prevChar = line[j];
|
|
37141
|
+
if (prevChar !== '"' && prevChar !== "'" && prevChar !== "=") continue;
|
|
37135
37142
|
if (!UNSAFE_REGEX.test(line)) continue;
|
|
37136
37143
|
if (SAFE_REGEX.test(line)) continue;
|
|
37137
37144
|
issues.push({
|
|
@@ -37142,7 +37149,7 @@ var javaSqlStringConcatRule = createRule({
|
|
|
37142
37149
|
message: `SQL query built via string concat at line ${i + 1}`,
|
|
37143
37150
|
line: i + 1,
|
|
37144
37151
|
column: 1,
|
|
37145
|
-
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.
|
|
37152
|
+
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.34.9 (refined: require SQL keyword to start a string literal; tightened SAFE_REGEX).'
|
|
37146
37153
|
});
|
|
37147
37154
|
}
|
|
37148
37155
|
return issues;
|
|
@@ -45598,7 +45605,7 @@ var signal_strength_default = {
|
|
|
45598
45605
|
precision: 0.0691,
|
|
45599
45606
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
45600
45607
|
verdict: "DORMANT",
|
|
45601
|
-
_calibrationNote:
|
|
45608
|
+
_calibrationNote: 'v0.34.9: REFINED \u2014 rule now requires the SQL keyword to be the start of a string literal (preceded by `"`, `\'`, or `=`), and tightened the SAFE_REGEX. Per-file unique v9 Java calibration (81891 neg, 10305 pos): 115 TP files, 1549 FP files, ratio=0.59 (DORMANT). 1664 total fires. The refinement is expected to push precision from 6.9% to 25%+ by removing lines where SELECT/INSERT appears in string values (e.g. `String msg = "Selected 1 row: " + count`). Also tightened SAFE_REGEX from `:??` to `:?` (the original was over-broad). The full v9 re-calibration is part of the broader v0.34.8/v0.34.9 pipeline (same pattern applied to kotlin/sql-string-concat and java/sql-string-concat). INSUFFICIENT_DATA: pos arm 10305 files, below the 10k floor. Era-confounded: pre-2022 Java used JDBC string concat more; modern Java uses PreparedStatement. defaultOff.',
|
|
45602
45609
|
aiSpecific: false,
|
|
45603
45610
|
_v9Verdict: "DORMANT",
|
|
45604
45611
|
_v9Lift: 0.59,
|
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var VERSION;
|
|
|
36
36
|
var init_header = __esm({
|
|
37
37
|
"src/types/_header.ts"() {
|
|
38
38
|
"use strict";
|
|
39
|
-
VERSION = "0.34.
|
|
39
|
+
VERSION = "0.34.9";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -30805,7 +30805,7 @@ var init_sql_string_concat = __esm({
|
|
|
30805
30805
|
init_rule();
|
|
30806
30806
|
SQL_KEYWORD_REGEX = /\b(?:SELECT|INSERT\s+INTO|UPDATE|DELETE\s+FROM|CREATE\s+TABLE|DROP\s+TABLE|ALTER\s+TABLE)\b/i;
|
|
30807
30807
|
UNSAFE_REGEX = /\+/;
|
|
30808
|
-
SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b
|
|
30808
|
+
SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b|\?)/;
|
|
30809
30809
|
javaSqlStringConcatRule = createRule({
|
|
30810
30810
|
id: "java/sql-string-concat",
|
|
30811
30811
|
category: "security",
|
|
@@ -30823,7 +30823,14 @@ var init_sql_string_concat = __esm({
|
|
|
30823
30823
|
const lines = source.split("\n");
|
|
30824
30824
|
for (let i = 0; i < lines.length; i++) {
|
|
30825
30825
|
const line = lines[i];
|
|
30826
|
-
|
|
30826
|
+
const keywordMatch = SQL_KEYWORD_REGEX.exec(line);
|
|
30827
|
+
if (!keywordMatch) continue;
|
|
30828
|
+
const keywordIdx = keywordMatch.index;
|
|
30829
|
+
let j = keywordIdx - 1;
|
|
30830
|
+
while (j >= 0 && /\s/.test(line[j])) j--;
|
|
30831
|
+
if (j < 0) continue;
|
|
30832
|
+
const prevChar = line[j];
|
|
30833
|
+
if (prevChar !== '"' && prevChar !== "'" && prevChar !== "=") continue;
|
|
30827
30834
|
if (!UNSAFE_REGEX.test(line)) continue;
|
|
30828
30835
|
if (SAFE_REGEX.test(line)) continue;
|
|
30829
30836
|
issues.push({
|
|
@@ -30834,7 +30841,7 @@ var init_sql_string_concat = __esm({
|
|
|
30834
30841
|
message: `SQL query built via string concat at line ${i + 1}`,
|
|
30835
30842
|
line: i + 1,
|
|
30836
30843
|
column: 1,
|
|
30837
|
-
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.
|
|
30844
|
+
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.34.9 (refined: require SQL keyword to start a string literal; tightened SAFE_REGEX).'
|
|
30838
30845
|
});
|
|
30839
30846
|
}
|
|
30840
30847
|
return issues;
|
|
@@ -51714,7 +51721,7 @@ var init_signal_strength = __esm({
|
|
|
51714
51721
|
precision: 0.0691,
|
|
51715
51722
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51716
51723
|
verdict: "DORMANT",
|
|
51717
|
-
_calibrationNote:
|
|
51724
|
+
_calibrationNote: 'v0.34.9: REFINED \u2014 rule now requires the SQL keyword to be the start of a string literal (preceded by `"`, `\'`, or `=`), and tightened the SAFE_REGEX. Per-file unique v9 Java calibration (81891 neg, 10305 pos): 115 TP files, 1549 FP files, ratio=0.59 (DORMANT). 1664 total fires. The refinement is expected to push precision from 6.9% to 25%+ by removing lines where SELECT/INSERT appears in string values (e.g. `String msg = "Selected 1 row: " + count`). Also tightened SAFE_REGEX from `:??` to `:?` (the original was over-broad). The full v9 re-calibration is part of the broader v0.34.8/v0.34.9 pipeline (same pattern applied to kotlin/sql-string-concat and java/sql-string-concat). INSUFFICIENT_DATA: pos arm 10305 files, below the 10k floor. Era-confounded: pre-2022 Java used JDBC string concat more; modern Java uses PreparedStatement. defaultOff.',
|
|
51718
51725
|
aiSpecific: false,
|
|
51719
51726
|
_v9Verdict: "DORMANT",
|
|
51720
51727
|
_v9Lift: 0.59,
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var VERSION;
|
|
|
19
19
|
var init_header = __esm({
|
|
20
20
|
"src/types/_header.ts"() {
|
|
21
21
|
"use strict";
|
|
22
|
-
VERSION = "0.34.
|
|
22
|
+
VERSION = "0.34.9";
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -30786,7 +30786,7 @@ var init_sql_string_concat = __esm({
|
|
|
30786
30786
|
init_rule();
|
|
30787
30787
|
SQL_KEYWORD_REGEX = /\b(?:SELECT|INSERT\s+INTO|UPDATE|DELETE\s+FROM|CREATE\s+TABLE|DROP\s+TABLE|ALTER\s+TABLE)\b/i;
|
|
30788
30788
|
UNSAFE_REGEX = /\+/;
|
|
30789
|
-
SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b
|
|
30789
|
+
SAFE_REGEX = /(?:PreparedStatement|setParameter|setString|setInt|setLong|createQuery.*:.*\b(?:set|bind)|:name\b|\?)/;
|
|
30790
30790
|
javaSqlStringConcatRule = createRule({
|
|
30791
30791
|
id: "java/sql-string-concat",
|
|
30792
30792
|
category: "security",
|
|
@@ -30804,7 +30804,14 @@ var init_sql_string_concat = __esm({
|
|
|
30804
30804
|
const lines = source.split("\n");
|
|
30805
30805
|
for (let i = 0; i < lines.length; i++) {
|
|
30806
30806
|
const line = lines[i];
|
|
30807
|
-
|
|
30807
|
+
const keywordMatch = SQL_KEYWORD_REGEX.exec(line);
|
|
30808
|
+
if (!keywordMatch) continue;
|
|
30809
|
+
const keywordIdx = keywordMatch.index;
|
|
30810
|
+
let j = keywordIdx - 1;
|
|
30811
|
+
while (j >= 0 && /\s/.test(line[j])) j--;
|
|
30812
|
+
if (j < 0) continue;
|
|
30813
|
+
const prevChar = line[j];
|
|
30814
|
+
if (prevChar !== '"' && prevChar !== "'" && prevChar !== "=") continue;
|
|
30808
30815
|
if (!UNSAFE_REGEX.test(line)) continue;
|
|
30809
30816
|
if (SAFE_REGEX.test(line)) continue;
|
|
30810
30817
|
issues.push({
|
|
@@ -30815,7 +30822,7 @@ var init_sql_string_concat = __esm({
|
|
|
30815
30822
|
message: `SQL query built via string concat at line ${i + 1}`,
|
|
30816
30823
|
line: i + 1,
|
|
30817
30824
|
column: 1,
|
|
30818
|
-
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.
|
|
30825
|
+
advice: 'Use a PreparedStatement (JDBC), setParameter (jOOQ), or an ORM (Hibernate, MyBatis with #{} binding). String concatenation into a SQL query is the canonical SQL-injection pattern \u2014 even "trusted" inputs (signed JWT, internal config) can be influenced by an attacker. Reference: java/sql-string-concat v0.34.9 (refined: require SQL keyword to start a string literal; tightened SAFE_REGEX).'
|
|
30819
30826
|
});
|
|
30820
30827
|
}
|
|
30821
30828
|
return issues;
|
|
@@ -51692,7 +51699,7 @@ var init_signal_strength = __esm({
|
|
|
51692
51699
|
precision: 0.0691,
|
|
51693
51700
|
lastCalibratedAt: "2026-07-03T00:00:00Z",
|
|
51694
51701
|
verdict: "DORMANT",
|
|
51695
|
-
_calibrationNote:
|
|
51702
|
+
_calibrationNote: 'v0.34.9: REFINED \u2014 rule now requires the SQL keyword to be the start of a string literal (preceded by `"`, `\'`, or `=`), and tightened the SAFE_REGEX. Per-file unique v9 Java calibration (81891 neg, 10305 pos): 115 TP files, 1549 FP files, ratio=0.59 (DORMANT). 1664 total fires. The refinement is expected to push precision from 6.9% to 25%+ by removing lines where SELECT/INSERT appears in string values (e.g. `String msg = "Selected 1 row: " + count`). Also tightened SAFE_REGEX from `:??` to `:?` (the original was over-broad). The full v9 re-calibration is part of the broader v0.34.8/v0.34.9 pipeline (same pattern applied to kotlin/sql-string-concat and java/sql-string-concat). INSUFFICIENT_DATA: pos arm 10305 files, below the 10k floor. Era-confounded: pre-2022 Java used JDBC string concat more; modern Java uses PreparedStatement. defaultOff.',
|
|
51696
51703
|
aiSpecific: false,
|
|
51697
51704
|
_v9Verdict: "DORMANT",
|
|
51698
51705
|
_v9Lift: 0.59,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slopbrick",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.9",
|
|
4
4
|
"description": "Discovered, modeled, and governed repository structure. SlopBrick scans source code, classifies it against 95+ rules in 15 categories, computes 4 scores (aiSlopScore: lower=cleaner, engineeringHygiene, security, repositoryHealth composite), and persists the structure for AI agents and CI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|