Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 🔤 Typos

on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_dispatch:

jobs:
typos:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: crate-ci/typos@v1.43.5
62 changes: 62 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Configuration for the typos spell checker
# https://github.com/crate-ci/typos

[files]
extend-exclude = [
# Non-English README translations
"README_CN.md",
"README_ES.md",
"README_ID.md",
"README_JP.md",
"README_KR.md",
"README_PT-BR.md",
"README_TR.md",
# Test fixtures and binary/encoded data
"pkg/input/formats/testdata/*",
"pkg/protocols/common/helpers/deserialization/testdata/*",
# WAF regex patterns contain intentional fragments
"pkg/output/stats/waf/regexes.json",
# Embedded certificates (base64 data)
"pkg/testutils/integration.go",
# Integration test templates with encoded payloads
"integration_tests/fuzz/*.yaml",
"integration_tests/protocols/**/*.yaml",
# Integration test binary/encoded data
"cmd/integration-test/generic.go",
]

[default.extend-identifiers]
# Variable/field names in code that are intentionally spelled this way
fo = "fo"
# Exported constant used across multiple files (changing would break API)
ExludedDastTmplStats = "ExludedDastTmplStats"
Exluded = "Exluded"
# Exported struct name (changing would break API)
PostReuestsHandlerRequest = "PostReuestsHandlerRequest"
Reuests = "Reuests"
# Variable names using "splitted" (non-standard but intentional)
splitted = "splitted"
originalSplitted = "originalSplitted"
Splitted = "Splitted"

[default.extend-words]
# CLI flag abbreviations used in help text and flag definitions
ines = "ines"
ine = "ine"
hae = "hae"
ue = "ue"
ot = "ot"
# External dependency type (projectdiscovery/goflags)
Allowd = "Allowd"
# NooP is a standard abbreviation for No-Operation
Noo = "Noo"
# MisMatched is a struct field name (Mis + Matched)
Mis = "Mis"
# Test data values (XML content, severity test case, base64 fragments)
alo = "alo"
Iif = "Iif"
Fo = "Fo"
# Spanish word in fuzz playground test data
algoritmos = "algoritmos"
# SELEC appears as part of SQL keyword testing
SELEC = "SELEC"
10 changes: 5 additions & 5 deletions cmd/tmc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ func process(opts options) error {
}

if opts.format {
formatedTemplateData, isFormated, err := formatTemplate(dataString)
formattedTemplateData, isFormatted, err := formatTemplate(dataString)
if err != nil {
gologger.Info().Label("format").Msg(logErrMsg(path, err, opts.debug, errFile))
} else {
if isFormated {
_ = os.WriteFile(path, []byte(formatedTemplateData), 0644)
dataString = formatedTemplateData
gologger.Info().Label("format").Msgf("✅ formated template: %s\n", path)
if isFormatted {
_ = os.WriteFile(path, []byte(formattedTemplateData), 0644)
dataString = formattedTemplateData
gologger.Info().Label("format").Msgf("✅ formatted template: %s\n", path)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type TemplateFilters struct {
ExcludeSeverities string // filter by excluding severities (accepts CSV values of info, low, medium, high, critical)
ProtocolTypes string // filter by protocol types
ExcludeProtocolTypes string // filter by excluding protocol types
Authors []string // fiter by author
Authors []string // filter by author
Tags []string // filter by tags present in template
ExcludeTags []string // filter by excluding tags present in template
IncludeTags []string // filter by including tags present in template
Expand Down
6 changes: 3 additions & 3 deletions lib/tests/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestSimpleNuclei(t *testing.T) {
defer ne.Close()
}

// this is shared test so needs to be run as seperate process
// this is shared test so needs to be run as separate process
if env.GetEnvOrDefault("TestSimpleNuclei", false) {
// run as new process
cmd := exec.Command(os.Args[0], "-test.run=TestSimpleNuclei")
Expand Down Expand Up @@ -81,7 +81,7 @@ func TestSimpleNucleiRemote(t *testing.T) {
require.Nil(t, err)
defer ne.Close()
}
// this is shared test so needs to be run as seperate process
// this is shared test so needs to be run as separate process
if env.GetEnvOrDefault("TestSimpleNucleiRemote", false) {
cmd := exec.Command(os.Args[0], "-test.run=TestSimpleNucleiRemote")
cmd.Env = append(os.Environ(), "TestSimpleNucleiRemote=true")
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestWithVarsNuclei(t *testing.T) {
require.Nil(t, err)
defer ne.Close()
}
// this is shared test so needs to be run as seperate process
// this is shared test so needs to be run as separate process
if env.GetEnvOrDefault("TestWithVarsNuclei", false) {
cmd := exec.Command(os.Args[0], "-test.run=TestWithVarsNuclei")
cmd.Env = append(os.Environ(), "TestWithVarsNuclei=true")
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/tmplexec/flow/flow_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestFlowWithConditionNegative(t *testing.T) {

input := contextargs.NewWithInput(context.Background(), "scanme.sh")
ctx := scan.NewScanContext(context.Background(), input)
// expect no results and verify thant dns request is executed and http is not
// expect no results and verify that dns request is executed and http is not
gotresults, err := Template.Executer.Execute(ctx)
require.Nil(t, err, "could not execute template")
require.False(t, gotresults)
Expand Down