Skip to content

Commit

Permalink
Add check-spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Sep 6, 2021
1 parent 5656ab2 commit eee3510
Show file tree
Hide file tree
Showing 8 changed files with 1,981 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# check-spelling/check-spelling configuration

File | Purpose | Format | Info
-|-|-|-
[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary)
[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)

Note: you can replace any of these files with a directory by the same name (minus the suffix)
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
27 changes: 27 additions & 0 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If you see a bunch of garbage</summary>

If it relates to a ...
<details><summary>well-formed pattern</summary>

See if there's a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it.

If not, try writing one and adding it to the `patterns.txt` file.

Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.
</details>
<details><summary>binary-ish string</summary>

Please add a file path to the `excludes.txt` file instead of just accepting the garbage.

File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
</details>

</details>
Empty file.
64 changes: 64 additions & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)package(?:-lock|)\.json$
(?:^|/)vendor/
ignore$
\.avi$
\.exe$
\.ico$
\.jpe?g$
\.lock$
\.map$
\.min\..
\.mod$
\.mp[34]$
\.pdf$
\.png$
\.wav$
^attack/disclosure-directory/
^attack/disclosure-localpaths/
^attack/email/
^attack/file-upload/malicious-images/
^attack/html_js_fuzz/
^attack/ip/
^attack/json/
^attack/unicode/
^attack/xml/
^discovery/dns/
^discovery/predictable-filepaths/
^discovery/UserAgent/
^docs/misc/htmlcodes-cheatsheet\.htm$
^wordlist
^\.github/
^\Qattack/file-upload/alt-extensions-asp.txt\E$
^\Qattack/file-upload/alt-extensions-coldfusion.txt\E$
^\Qattack/file-upload/alt-extensions-jsp.txt\E$
^\Qattack/file-upload/alt-extensions-php.txt\E$
^\Qattack/file-upload/file-ul-filter-bypass-microsoft-asp.txt\E$
^\Qattack/file-upload/file-ul-filter-bypass-ms-php.txt\E$
^\Qattack/file-upload/file-ul-filter-bypass-x-platform-php.txt\E$
^\Qattack/html_js_fuzz/html_attributes.txt\E$
^\Qattack/html_js_fuzz/javascript_events.txt\E$
^\Qattack/http-protocol/crlf-injection.txt\E$
^\Qattack/http-protocol/known-uri-types.txt\E$
^\Qattack/integer-overflow/integer-overflows.txt\E$
^\Qattack/lfi/JHADDIX_LFI.txt\E$
^\Qattack/mimetypes/MimeTypes.txt\E$
^\Qattack/os-cmd-execution/Commands-Linux.txt\E$
^\Qattack/os-cmd-execution/Commands-Windows.txt\E$
^\Qattack/path-traversal/path-traversal-windows.txt\E$
^\Qattack/path-traversal/traversals-8-deep-exotic-encoding.txt\E$
^\Qattack/rfi/rfi.txt\E$
^\Qattack/unicode/upsidedown.txt\E$
^\Qattack/xss/html-event-attributes.txt\E$
^\Qattack/xss/test.xxe\E$
^\Qattack/xss/xss-other.txt\E$
^\Qdiscovery/dns/alexaTop1mAXFRcommonSubdomains.txt\E$
^\Qdiscovery/URI_SCHEMES/IANA_registerd_URI_schemes.txt\E$
^\Qdiscovery/UserAgent/UserAgents.txt\E$
^\Qregex/breakpoint-ignores.txt\E$
^\Qregex/pii.readme.txt\E$
^\Qregex/pii.txt\E$
^\Qregex/sessionid.txt\E$
^\Qweb-backdoors/sh/cmd.sh\E$
Loading

1 comment on commit eee3510

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the action log for details.

Unrecognized words (60)
addes
algorythm
assasinate
attrbute
avaliable
avilable
chanage
colums
comming
commmand
conyains
curcuit
daemonisation
daemonise
daemonised
developped
Directoy
divison
ecape
evakuate
excute
extention
Fordarded
Genereate
hanlder
libaries
Occsionally
onfuscated
opertor
paramater
paramets
paramter
polution
Populatity
possile
Potsgre
preent
Priavacy
programm
Quoute
registerd
reproduceability
retreive
rudamentary
Secert
selall
selfcontained
seperator
shoud
similiar
situtaions
sperated
spesified
Spetznaz
supress
Suspecious
temporarely
usefull
verificationi
whre
Previously acknowledged words that are now absent Daemonise daemonization daemonize daemonized Spetsnaz
Available dictionaries could cover words not in the dictionary

cspell:cpp/cpp.txt (104293) covers 202 of them
cspell:html/html.txt (542) covers 54 of them
cspell:filetypes/filetypes.txt (337) covers 44 of them
cspell:css/css.txt (993) covers 28 of them
cspell:golang/go.txt (7745) covers 22 of them
cspell:django/django.txt (2342) covers 20 of them
cspell:aws/aws.txt (1485) covers 20 of them
cspell:npm/npm.txt (671) covers 16 of them
cspell:fullstack/fullstack.txt (181) covers 13 of them
cspell:python/python.txt (364) covers 10 of them
cspell:java/java.txt (33524) covers 10 of them
cspell:scala/scala.txt (2752) covers 9 of them
cspell:lua/lua.txt (391) covers 8 of them
cspell:rust/rust.txt (112) covers 6 of them
cspell:php/php.txt (9785) covers 6 of them
cspell:csharp/csharp.txt (123) covers 6 of them
cspell:ruby/ruby.txt (354) covers 5 of them
cspell:dotnet/dotnet.txt (9824) covers 3 of them
cspell:ada/ada.txt (72) covers 1 of them

Consider adding them using:

      with:
        extra_dictionaries:
          cspell:cpp/cpp.txt
          cspell:html/html.txt
          cspell:filetypes/filetypes.txt
          cspell:css/css.txt
          cspell:golang/go.txt
          cspell:django/django.txt
          cspell:aws/aws.txt
          cspell:npm/npm.txt
          cspell:fullstack/fullstack.txt
          cspell:python/python.txt
          cspell:java/java.txt
          cspell:scala/scala.txt
          cspell:lua/lua.txt
          cspell:rust/rust.txt
          cspell:php/php.txt
          cspell:csharp/csharp.txt
          cspell:ruby/ruby.txt
          cspell:dotnet/dotnet.txt
          cspell:ada/ada.txt

To stop checking additional dictionaries, add:

      with:
        check_extra_dictionaries: ''
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:jsoref/fuzzdb.git repository
on the spell-check branch:

(cd $(git rev-parse --show-toplevel)
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"Daemonise daemonization daemonize daemonized Spetsnaz "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"addes
algorythm
assasinate
attrbute
avaliable
avilable
chanage
colums
comming
commmand
conyains
curcuit
daemonisation
daemonise
daemonised
developped
Directoy
divison
ecape
evakuate
excute
extention
Fordarded
Genereate
hanlder
libaries
Occsionally
onfuscated
opertor
paramater
paramets
paramter
polution
Populatity
possile
Potsgre
preent
Priavacy
programm
Quoute
registerd
reproduceability
retreive
rudamentary
Secert
selall
selfcontained
seperator
shoud
similiar
situtaions
sperated
spesified
Spetznaz
supress
Suspecious
temporarely
usefull
verificationi
whre"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
)
If you see a bunch of garbage

If it relates to a ...

well-formed pattern

See if there's a pattern that would match it.

If not, try writing one and adding it to the patterns.txt file.

Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.

binary-ish string

Please add a file path to the excludes.txt file instead of just accepting the garbage.

File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

Please sign in to comment.