Integrate typos tool into CI#6967
Integrate typos tool into CI#6967SolariSystems wants to merge 17 commits intoprojectdiscovery:mainfrom
Conversation
…6797) Bumps the modules group with 8 updates: | Package | From | To | | --- | --- | --- | | [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) | `0.5.3` | `0.5.4` | | [github.com/projectdiscovery/hmap](https://github.com/projectdiscovery/hmap) | `0.0.99` | `0.0.100` | | [github.com/projectdiscovery/interactsh](https://github.com/projectdiscovery/interactsh) | `1.2.4` | `1.3.0` | | [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) | `1.3.5` | `1.3.6` | | [github.com/projectdiscovery/dsl](https://github.com/projectdiscovery/dsl) | `0.8.12` | `0.8.13` | | [github.com/projectdiscovery/gologger](https://github.com/projectdiscovery/gologger) | `1.1.67` | `1.1.68` | | [github.com/projectdiscovery/wappalyzergo](https://github.com/projectdiscovery/wappalyzergo) | `0.2.65` | `0.2.66` | | [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck) | `1.2.20` | `1.2.21` | Updates `github.com/projectdiscovery/fastdialer` from 0.5.3 to 0.5.4 - [Release notes](https://github.com/projectdiscovery/fastdialer/releases) - [Commits](projectdiscovery/fastdialer@v0.5.3...v0.5.4) Updates `github.com/projectdiscovery/hmap` from 0.0.99 to 0.0.100 - [Release notes](https://github.com/projectdiscovery/hmap/releases) - [Commits](projectdiscovery/hmap@v0.0.99...v0.0.100) Updates `github.com/projectdiscovery/interactsh` from 1.2.4 to 1.3.0 - [Release notes](https://github.com/projectdiscovery/interactsh/releases) - [Commits](projectdiscovery/interactsh@v1.2.4...v1.3.0) Updates `github.com/projectdiscovery/retryablehttp-go` from 1.3.5 to 1.3.6 - [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases) - [Commits](projectdiscovery/retryablehttp-go@v1.3.5...v1.3.6) Updates `github.com/projectdiscovery/dsl` from 0.8.12 to 0.8.13 - [Release notes](https://github.com/projectdiscovery/dsl/releases) - [Commits](projectdiscovery/dsl@v0.8.12...v0.8.13) Updates `github.com/projectdiscovery/gologger` from 1.1.67 to 1.1.68 - [Release notes](https://github.com/projectdiscovery/gologger/releases) - [Commits](projectdiscovery/gologger@v1.1.67...v1.1.68) Updates `github.com/projectdiscovery/wappalyzergo` from 0.2.65 to 0.2.66 - [Release notes](https://github.com/projectdiscovery/wappalyzergo/releases) - [Commits](projectdiscovery/wappalyzergo@v0.2.65...v0.2.66) Updates `github.com/projectdiscovery/cdncheck` from 1.2.20 to 1.2.21 - [Release notes](https://github.com/projectdiscovery/cdncheck/releases) - [Commits](projectdiscovery/cdncheck@v1.2.20...v1.2.21) --- updated-dependencies: - dependency-name: github.com/projectdiscovery/fastdialer dependency-version: 0.5.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/hmap dependency-version: 0.0.100 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/interactsh dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: modules - dependency-name: github.com/projectdiscovery/retryablehttp-go dependency-version: 1.3.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/dsl dependency-version: 0.8.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/gologger dependency-version: 1.1.68 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/wappalyzergo dependency-version: 0.2.66 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/cdncheck dependency-version: 1.2.21 dependency-type: indirect update-type: version-update:semver-patch dependency-group: modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ery#6796) Refactor `ParseTemplateFromReader` to parse YAML once after applying preprocessors, avoiding redundant parsing for verification. Also add `parseTemplateNoVerify` and `applyTemplateVerification` helpers to separate parsing from signature verification logic to reduce CPU overhead during startup template loading. Signed-off-by: Dwi Siswanto <git@dw1.io>
Closes projectdiscovery#6734. Signed-off-by: Dwi Siswanto <git@dw1.io>
…6853) Bumps the modules group with 2 updates: [github.com/projectdiscovery/wappalyzergo](https://github.com/projectdiscovery/wappalyzergo) and [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck). Updates `github.com/projectdiscovery/wappalyzergo` from 0.2.66 to 0.2.67 - [Release notes](https://github.com/projectdiscovery/wappalyzergo/releases) - [Commits](projectdiscovery/wappalyzergo@v0.2.66...v0.2.67) Updates `github.com/projectdiscovery/cdncheck` from 1.2.21 to 1.2.22 - [Release notes](https://github.com/projectdiscovery/cdncheck/releases) - [Commits](projectdiscovery/cdncheck@v1.2.21...v1.2.22) --- updated-dependencies: - dependency-name: github.com/projectdiscovery/wappalyzergo dependency-version: 0.2.67 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/cdncheck dependency-version: 1.2.22 dependency-type: indirect update-type: version-update:semver-patch dependency-group: modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the go_modules group with 1 update in the / directory: [github.com/go-git/go-git/v5](https://github.com/go-git/go-git). Updates `github.com/go-git/go-git/v5` from 5.16.2 to 5.16.5 - [Release notes](https://github.com/go-git/go-git/releases) - [Commits](go-git/go-git@v5.16.2...v5.16.5) --- updated-dependencies: - dependency-name: github.com/go-git/go-git/v5 dependency-version: 5.16.5 dependency-type: direct:production dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pport (projectdiscovery#6841) * chore(deps): bump github.com/bytedance/sonic to 1.15.0 for Go 1.26 support Update https://github.com/bytedance/sonic to https://github.com/bytedance/sonic/releases/tag/v1.15.0 For * bytedance/sonic#898 Found in * Homebrew/homebrew-core#258912 Upgraded by performing: ``` $ go1.26rc3 build -v ./... github.com/bytedance/sonic/internal/rt # github.com/bytedance/sonic/internal/rt ../../../go/pkg/mod/github.com/bytedance/sonic@v1.14.0/internal/rt/stubs.go:33:22: undefined: GoMapIterator ../../../go/pkg/mod/github.com/bytedance/sonic@v1.14.0/internal/rt/stubs.go:36:54: undefined: GoMapIterator $ go get github.com/bytedance/sonic@latest && go mod tidy go: added github.com/bytedance/gopkg v0.1.3 go: upgraded github.com/bytedance/sonic v1.14.0 => v1.15.0 go: upgraded github.com/bytedance/sonic/loader v0.3.0 => v0.5.0 go: upgraded github.com/cloudwego/base64x v0.1.5 => v0.1.6 $ go1.26rc3 build -v ./... $ ``` * chore(utils): update version range for json bytedance/sonic, to include 1.26 Signed-off-by: Dwi Siswanto <git@dw1.io> --------- Signed-off-by: Dwi Siswanto <git@dw1.io> Co-authored-by: Dwi Siswanto <git@dw1.io>
…6908) Bumps the modules group with 2 updates: [github.com/projectdiscovery/wappalyzergo](https://github.com/projectdiscovery/wappalyzergo) and [github.com/projectdiscovery/cdncheck](https://github.com/projectdiscovery/cdncheck). Updates `github.com/projectdiscovery/wappalyzergo` from 0.2.67 to 0.2.68 - [Release notes](https://github.com/projectdiscovery/wappalyzergo/releases) - [Commits](projectdiscovery/wappalyzergo@v0.2.67...v0.2.68) Updates `github.com/projectdiscovery/cdncheck` from 1.2.22 to 1.2.23 - [Release notes](https://github.com/projectdiscovery/cdncheck/releases) - [Commits](projectdiscovery/cdncheck@v1.2.22...v1.2.23) --- updated-dependencies: - dependency-name: github.com/projectdiscovery/wappalyzergo dependency-version: 0.2.68 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: modules - dependency-name: github.com/projectdiscovery/cdncheck dependency-version: 1.2.23 dependency-type: indirect update-type: version-update:semver-patch dependency-group: modules ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
projectdiscovery#6828) Clone the data map before modification to prevent race conditions when multiple goroutines call evaluateVarsWithInteractsh concurrently with a shared map. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
Hi! Following up on this PR. Let me know if there are any changes needed or if anything should be adjusted. Happy to iterate on feedback. Thanks! |
Remove .solari_deps_installed that was accidentally committed.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Neo Security AuditHigh: 2 · Medium: 7 Highlights
High (2)
Medium (7)
Attack ExamplesUnpinned GitHub Actions allow supply chain attacks ( Unpinned GitHub Action: projectdiscovery/actions/setup/git ( Unpinned GitHub Action: projectdiscovery/actions/commit ( Suggested FixesUnpinned GitHub Actions allow supply chain attacks ( Unpinned GitHub Actions in typos.toml workflow ( Unpinned custom GitHub Actions in memogen workflow ( Suboptimal typos installation method in CI workflow ( Unpinned pip package version allows supply chain drift ( Suboptimal typos installation method in CI workflow ( Unpinned pip package version allows supply chain drift ( Unpinned GitHub Action: projectdiscovery/actions/setup/git ( Unpinned GitHub Action: projectdiscovery/actions/commit ( AI Agent Fix PromptsReplace pip install typos with official crate-ci/typos GitHub Action Pin typos package version with hash verification or switch to official GitHub Action Replace pip install typos with official crate-ci/typos GitHub Action Pin typos package version with hash verification or switch to official GitHub Action Hardening Notes
Comment |
.github/workflows/typos.yml
Outdated
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 |
There was a problem hiding this comment.
🟡 Unpinned GitHub Actions allow supply chain attacks (CWE-1357) — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs. An attacker who compromises the actions/checkout or actions/setup-python repositories could inject malicious code that would execute in this workflow.
Attack Example
Attacker compromises actions/checkout repo and publishes malicious v2 tag that exfiltrates GITHUB_TOKEN and repository secrets
Suggested Fix
Pin actions to specific commit SHAs: uses: actions/checkout@<commit-sha> and uses: actions/setup-python@<commit-sha>. Use Dependabot to keep them updated.
.github/workflows/typos.toml
Outdated
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 |
There was a problem hiding this comment.
🟡 Unpinned GitHub Actions in typos.toml workflow (CWE-1357) — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs. Same vulnerability as typos.yml - allows supply chain attacks if upstream actions are compromised.
Suggested Fix
Pin actions to specific commit SHAs: uses: actions/checkout@<commit-sha> and uses: actions/setup-python@<commit-sha>
.github/workflows/memogen.yaml
Outdated
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: projectdiscovery/actions/setup/go@v1 |
There was a problem hiding this comment.
🟡 Unpinned custom GitHub Actions in memogen workflow (CWE-1357) — Custom projectdiscovery actions are pinned to mutable tags (@v1, @v6) instead of commit SHAs. While these are internal actions, they still present supply chain risk if the actions repository is compromised.
Suggested Fix
Pin all actions to commit SHAs, including internal projectdiscovery/actions. Example: uses: actions/checkout@a12b3c4d5e6f... and uses: projectdiscovery/actions/setup/go@abc123...
…in attacks (CWE-1357)** — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs; 🟡 **Unpinned GitHub Actions in typos.toml workfl
…in attacks (CWE-1357)** — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs; 🟡 **Unpinned GitHub Actions in typos.toml workfl
.github/workflows/typos.yml
Outdated
|
|
||
| - name: Install typos | ||
| run: | | ||
| pip install typos |
There was a problem hiding this comment.
🟡 Suboptimal typos installation method in CI workflow — The workflow installs typos via pip (Python package manager) instead of using the official GitHub Action or pre-built binaries. While the PyPI package is legitimate, this approach is less secure and less efficient than the recommended methods.
Suggested Fix
Replace the Python setup and pip install steps with the official typos GitHub Action:
```yaml
- name: Check spelling with typos
uses: crate-ci/typos@v1.28.3
Alternatively, install the pre-built binary directly:
- name: Install typos
run: |
curl -LsSf https://github.com/crate-ci/typos/releases/latest/download/typos-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C /usr/local/bin</details>
<details>
<summary><strong>AI Agent Prompt</strong></summary>
Replace pip install typos with official crate-ci/typos GitHub Action
</details>
.github/workflows/typos.yml
Outdated
|
|
||
| - name: Install typos | ||
| run: | | ||
| pip install typos |
There was a problem hiding this comment.
🟡 Unpinned pip package version allows supply chain drift — The command 'pip install typos' installs the latest version without pinning to a specific version or hash. This allows automatic updates that could introduce breaking changes or malicious code if the package is compromised.
Suggested Fix
If continuing with pip installation, pin to a specific version and verify with hash:
```yaml
- name: Install typos
run: |
pip install typos==1.40.0 --require-hashes --hash=sha256:...
However, switching to the official GitHub Action (as recommended above) is the better solution as it uses pinned commit SHAs.
</details>
<details>
<summary><strong>AI Agent Prompt</strong></summary>
Pin typos package version with hash verification or switch to official GitHub Action
</details>
| @@ -0,0 +1,28 @@ | |||
| name: Typos Check | |||
There was a problem hiding this comment.
🟡 Suboptimal typos installation method in CI workflow — The workflow installs typos via pip (Python package manager) instead of using the official GitHub Action or pre-built binaries. While the PyPI package is legitimate, this approach is less secure and less efficient than the recommended methods.
Suggested Fix
Replace the Python setup and pip install steps with the official typos GitHub Action:
```yaml
- name: Check spelling with typos
uses: crate-ci/typos@v1.28.3
Alternatively, install the pre-built binary directly:
- name: Install typos
run: |
curl -LsSf https://github.com/crate-ci/typos/releases/latest/download/typos-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C /usr/local/bin</details>
<details>
<summary><strong>AI Agent Prompt</strong></summary>
Replace pip install typos with official crate-ci/typos GitHub Action
</details>
| @@ -0,0 +1,28 @@ | |||
| name: Typos Check | |||
There was a problem hiding this comment.
🟡 Unpinned pip package version allows supply chain drift — The command 'pip install typos' installs the latest version without pinning to a specific version or hash. This allows automatic updates that could introduce breaking changes or malicious code if the package is compromised.
Suggested Fix
If continuing with pip installation, pin to a specific version and verify with hash:
```yaml
- name: Install typos
run: |
pip install typos==1.40.0 --require-hashes --hash=sha256:...
However, switching to the official GitHub Action (as recommended above) is the better solution as it uses pinned commit SHAs.
</details>
<details>
<summary><strong>AI Agent Prompt</strong></summary>
Pin typos package version with hash verification or switch to official GitHub Action
</details>
.github/workflows/memogen.yaml
Outdated
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: projectdiscovery/actions/setup/go@v1 | ||
| - uses: projectdiscovery/actions/setup/git@v1 |
There was a problem hiding this comment.
🟠 Unpinned GitHub Action: projectdiscovery/actions/setup/git (CWE-829) — Action projectdiscovery/actions/setup/git@v1 uses mutable tag instead of commit SHA
Attack Example
Attacker updates @v1 tag → malicious code runs in workflow → exfiltrates secrets from environment → pushes backdoor via line 29
Suggested Fix
Pin to commit SHA: uses: projectdiscovery/actions/setup/git@<commit-sha> # v1
.github/workflows/memogen.yaml
Outdated
| - run: make memogen | ||
| - run: git status -s | wc -l | xargs -I {} echo CHANGES={} >> $GITHUB_OUTPUT | ||
| id: status | ||
| - uses: projectdiscovery/actions/commit@v1 |
There was a problem hiding this comment.
🟠 Unpinned GitHub Action: projectdiscovery/actions/commit (CWE-829) — Action projectdiscovery/actions/commit@v1 uses mutable tag instead of commit SHA
Attack Example
Attacker updates @v1 tag → malicious commit action injects backdoor into codebase → automated push (line 29) deploys malicious code
Suggested Fix
Pin to commit SHA: uses: projectdiscovery/actions/commit@<commit-sha> # v1
…in attacks (CWE-1357)** — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs; 🟡 **Unpinned GitHub Actions in typos.toml workfl
…in attacks (CWE-1357)** — GitHub Actions are pinned to mutable tags (@v2) instead of immutable commit SHAs; 🟡 **Unpinned GitHub Actions in typos.toml workfl
|
Closing — the linked issue #6871 has been closed. Thanks for the consideration. |
Uh oh!
There was an error while loading. Please reload this page.