tangled
alpha
login
or
join now
skywatch.blue
/
skywatch-automod
7
fork
atom
A tool for parsing traffic on the jetstream and applying a moderation workstream based on regexp based rules
7
fork
atom
overview
issues
pulls
pipelines
Add example config files for CI tests
Skywatch
4 months ago
64aed413
52f2ebbf
+67
4 changed files
expand all
collapse all
unified
split
.github
workflows
ci.yml
src
constants.example.ts
rules
posts
constants.example.ts
profiles
constants.example.ts
+7
.github/workflows/ci.yml
···
21
21
- name: Install dependencies
22
22
run: bun install
23
23
24
24
+
- name: Setup example config files for CI
25
25
+
run: |
26
26
+
cp src/constants.example.ts src/constants.ts
27
27
+
cp src/rules/handles/constants.example.ts src/rules/handles/constants.ts
28
28
+
cp src/rules/posts/constants.example.ts src/rules/posts/constants.ts
29
29
+
cp src/rules/profiles/constants.example.ts src/rules/profiles/constants.ts
30
30
+
24
31
# - name: Run linter
25
32
# run: npm run lint
26
33
+4
src/constants.example.ts
···
1
1
+
/**
2
2
+
* Global allowlist of DIDs that should never be moderated
3
3
+
*/
4
4
+
export const GLOBAL_ALLOW: string[] = [];
+1
src/rules/posts/constants.example.ts
···
1
1
+
import type { Checks } from "../../types.js";
+55
src/rules/profiles/constants.example.ts
···
1
1
+
import type { Checks } from "../../types.js";
2
2
+
3
3
+
/**
4
4
+
* Example profile check configurations
5
5
+
*
6
6
+
* This file demonstrates how to configure profile moderation rules.
7
7
+
* Copy this file to constants.ts and customize for your labeler's needs.
8
8
+
*
9
9
+
* Profile checks can match against display names and/or descriptions.
10
10
+
*/
11
11
+
12
12
+
export const PROFILE_CHECKS: Checks[] = [
13
13
+
// Example 1: Suspicious bio patterns
14
14
+
{
15
15
+
label: "suspicious-bio",
16
16
+
comment: "Profile contains suspicious patterns",
17
17
+
description: true,
18
18
+
displayName: false,
19
19
+
reportAcct: false,
20
20
+
commentAcct: false,
21
21
+
toLabel: true,
22
22
+
check: new RegExp(
23
23
+
"dm.*?for.*?promo|follow.*?for.*?follow|gain.*?followers",
24
24
+
"i",
25
25
+
),
26
26
+
},
27
27
+
28
28
+
// Example 2: Display name checks
29
29
+
{
30
30
+
label: "impersonation-risk",
31
31
+
comment: "Display name may indicate impersonation",
32
32
+
description: false,
33
33
+
displayName: true,
34
34
+
reportAcct: false,
35
35
+
commentAcct: false,
36
36
+
toLabel: true,
37
37
+
check: new RegExp("official|verified|admin|support", "i"),
38
38
+
whitelist: new RegExp("unofficial|parody|fan", "i"),
39
39
+
ignoredDIDs: [
40
40
+
"did:plc:example123", // Actual official account
41
41
+
],
42
42
+
},
43
43
+
44
44
+
// Example 3: Both display name and description
45
45
+
{
46
46
+
label: "crypto-spam",
47
47
+
comment: "Profile suggests crypto spam activity",
48
48
+
description: true,
49
49
+
displayName: true,
50
50
+
reportAcct: false,
51
51
+
commentAcct: false,
52
52
+
toLabel: true,
53
53
+
check: new RegExp("crypto.*?giveaway|nft.*?drop|airdrop", "i"),
54
54
+
},
55
55
+
];