@andesyte-oss/security-rules 0.1.4 → 0.2.0
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/index.d.ts +8 -0
- package/dist/index.js +10 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,14 @@ export declare function rulePaths(options?: {
|
|
|
8
8
|
reviewSinks?: boolean;
|
|
9
9
|
}): string[];
|
|
10
10
|
export declare const RULESET_NAME = "andesyte-local";
|
|
11
|
+
/**
|
|
12
|
+
* The sink-review rule family, owned here where the rule ids are authored.
|
|
13
|
+
* Adapters classify findings through this helper instead of string-matching
|
|
14
|
+
* the prefix themselves, so renaming the family or adding a second review
|
|
15
|
+
* pack is a one-package change.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SINK_REVIEW_RULE_PREFIX = "ai.sink-review.";
|
|
18
|
+
export declare function isSinkReviewRuleId(ruleId: string | undefined): boolean;
|
|
11
19
|
export declare const RULESET_VERSION: string;
|
|
12
20
|
export interface RulesetDescriptor {
|
|
13
21
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,16 @@ export function rulePaths(options = {}) {
|
|
|
27
27
|
return files;
|
|
28
28
|
}
|
|
29
29
|
export const RULESET_NAME = "andesyte-local";
|
|
30
|
+
/**
|
|
31
|
+
* The sink-review rule family, owned here where the rule ids are authored.
|
|
32
|
+
* Adapters classify findings through this helper instead of string-matching
|
|
33
|
+
* the prefix themselves, so renaming the family or adding a second review
|
|
34
|
+
* pack is a one-package change.
|
|
35
|
+
*/
|
|
36
|
+
export const SINK_REVIEW_RULE_PREFIX = "ai.sink-review.";
|
|
37
|
+
export function isSinkReviewRuleId(ruleId) {
|
|
38
|
+
return typeof ruleId === "string" && ruleId.startsWith(SINK_REVIEW_RULE_PREFIX);
|
|
39
|
+
}
|
|
30
40
|
function packageVersion() {
|
|
31
41
|
try {
|
|
32
42
|
const manifest = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andesyte-oss/security-rules",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Andesyte curated Semgrep security rules, shipped as packaged local files (no registry fetch).",
|
|
5
5
|
"homepage": "https://andesyte.com",
|
|
6
6
|
"author": "Andesyte <lewis@andesyte.com>",
|