Skip to content

Commit

Permalink
add woke scan rules in v0.5.x branch (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
katmutua authored Jul 28, 2023
1 parent d8f7e5f commit 4db7df4
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: get-woke/woke-action@v0
with:
fail-on-error: true
woke-args: -c https://via.vmw.com/its-woke-rules
woke-args: -c woke/woke.yaml
- uses: codecov/codecov-action@v3
- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test: generate fmt vet ## Run tests

.PHONY:
scan-terms: ## Scan for inclusive terminology
@$(WOKE) . -c https://via.vmw.com/its-woke-rules --exit-1-on-failure
@$(WOKE) . -c woke/woke.yaml --exit-1-on-failure

# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
Expand Down
158 changes: 158 additions & 0 deletions woke/woke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
rules:
- name: black hat
terms: [black hat]
severity: error
regex: black[\s-_]*hat
regexMs: "[bB]lackhat(*)>"
alternatives: [ unethical(adj), unethical hacker(n) ]
description: This term is racially insensitive
- name: blacklist
terms: [blacklist]
severity: error
regex: black[\s-_]*list
regexMs: "[bB]lacklist(*)>"
alternatives: [ denylist(n), banned list(n), block(v), deny(v), ban(v) ]
description: This term is racially insensitive
- name: blackout
terms: [blackout]
severity: error
regex: black[\s-_]*out
regexMs: "[bB]lackout(*)>"
alternatives: [restriction(n), outage(n), restrict(v), failed (adj)]
description: This term is racially insensitive
- name: brownout
terms: [brownout]
severity: error
regex: brown[\s-_]*out
regexMs: "[bB]rownout(*)>"
alternatives: [restriction(n), outage(n), restrict(v), failed (adj), network degradation (np)]
description: This term is racially insensitive
- name: cakewalk
terms: [cakewalk]
severity: error
regex: cake[\s-_]*walk
regexMs: "[cC]akewalk(*)>"
alternatives: [ easy ]
description: [ This term is racially insensitive ]
- name: disable
terms: [disable]
severity: error
regex: "\\sdisabled*\\s"
regexMs: "[dD]isable(*)>"
alternatives: [ deactivate ]
description: This term is insensitive to persons with disabilities
- name: female
terms: [female]
severity: error
regex: "\\bfemale\\b"
regexMs: "[fF]emale(*)>"
alternatives: [ jack(n), socket(n) ]
description: This term can be genderist. Avoid using it in anthropomorphic contexts
such as for physical connections.
- name: grandfathered
terms: [grandfathered]
severity: error
regex: "\\bgrandfathered\\b"
regexMs: "[gG]randfathered(*)>"
alternatives: [ legacy (adj) ]
description: This is racially insensitive when used as an adjective or verb.
- name: handicap
terms: [handicap]
severity: error
regex: "\\bhandicap\\b"
regexMs: "[hH]andicap(*)>"
alternatives: [ obstacle (n), impede (v), restrict (v) ]
description: This term is insensitive to persons with disabilities
- name: kill
terms: [kill]
severity: error
regex: "\\bkill[a-zA-Z]*\\b"
regexMs: "[kK]ill(*)>"
alternatives: [ stop, halt ]
description: This term carries implications of violence
- name: male
terms: [male]
severity: error
regex: "\\bmale\\b"
regexMs: "[mM]ale(*)>"
alternatives: [plug]
description: This term can be genderist. Avoid using it in anthropomorphic contexts
such as for physical connections.
- name: master
terms: [master]
severity: error
regex: "\\bmaster(?!')\\b"
regexMs: "[mM]aster(*)>"
alternatives: [ primary, main, controller, control plane, original, reference, leader ]
description: This term is racially insensitive
note: This term is racially insensitive
- name: rule of thumb
terms: [rule of thumb]
severity: error
regex: rule[\s-]+of[\s-]+thumb
regexMs: "[rR]ule[-_]of[-_]thumb(*)>"
alternatives: [ rule, guideline ]
description: This term carries implications of domestic violence
- name: sanity check
terms: [sanity check]
severity: error
regex: sanity[\s-_]*check
regexMs: "[sS]anitycheck(*)>"
alternatives: [ confidence check ]
description: This term is insensitive to persons with disabilities
- name: sanity test
terms: [sanity test]
severity: error
regex: sanity[\s-_]*test
regexMs: "[sS]anitytest(*)>"
alternatives: [ confidence test ]
description: This term is insensitive to persons with disabilities
- name: segregate
terms: [segregate]
severity: error
regex: "\\bsegregate"
regexMs: "[sS]egregate(*)>"
alternatives: [ separate ]
description: This term is racially insensitive
- name: segregation
terms: [segregation]
severity: error
regex: "\\bsegregation\\b"
regexMs: "[sS]egregation(*)>"
alternatives: [ separation ]
description: This term is racially insensitive
- name: slave
terms: [slave]
severity: error
regex: "\\bslave\\b"
regexMs: "[sS]lave(*)>"
alternatives: [ secondary, worker, replica ]
description: This term is racially insensitive
- name: suffer
terms: [suffer]
severity: error
regex: "\\bsuffer\\b"
regexMs: "[sS]uffer(*)>"
alternatives: [ decrease, lessen, shrink, increase, growth, experience ]
description: This term carries implications of violence
- name: war room
terms: [war room]
severity: error
regex: war[\s-_]*room
regexMs: "[wW]arroom(*)>"
alternatives: [ operations room, ops room ]
description: This term carries implications of violence
- name: white hat
terms: [white hat]
severity: error
regex: white[\s-_]*hat
regexMs: "[wW]hitehat(*)>"
alternatives: [ ethical(adj) ]
description: This term is racially insensitive
- name: whitelist
terms: [whitelist]
severity: error
regex: white[\s-_]*list
regexMs: "[wW]hitelist(*)>"
alternatives: [ allowlist(n), safelist(n), acceptlist(n), approved list(n), allow(v), approve(v) ]
description: This term is racially insensitive

0 comments on commit 4db7df4

Please sign in to comment.