Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra[patch]: Sanitize body in spam filter #6642

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

AdnaneKhan
Copy link
Contributor

@AdnaneKhan AdnaneKhan commented Aug 27, 2024

Good to sanitize the comment - otherwise the spammer could quite literally do much worse than spam the repository.

My tool picked this up on a nightly scan I run (just running on the repo here):


 .d8888b.         d8888 88888888888  .d88888b.         Y88b   d88P
d88P  Y88b       d88888     888     d88P" "Y88b         Y88b d88P
888    888      d88P888     888     888     888          Y88o88P
888            d88P 888     888     888     888           Y888P
888  88888    d88P  888     888     888     888           d888b
888    888   d88P   888     888     888     888 888888   d88888b
Y88b  d88P  d8888888888     888     Y88b. .d88P         d88P Y88b
 "Y8888P88 d88P     888     888      "Y88888P"         d88P   Y88b

    By @adnanthekhan - github.com/AdnaneKhan/gato-x


[+] The authenticated user is: AdnaneKhan
[+] The GitHub Classic PAT has the following scopes: gist, read:org, repo, workflow
[+] Querying and caching workflow YAML files from 1 repositories!
    - Enumerating: langchain-ai/langchainjs!
|==============================================================================|
| Repository Name: langchain-ai/langchainjs                                    |
| Report Type: Actions Script Injection                                        |
|------------------------------------------------------------------------------|
| Workflow Name: spam-comment-filter.yml                                       |
| Issue Type: Actions Injection                                                |
| Trigger(s): issue_comment                                                    |
| Details: The workflow uses variables by context expression within run or     |
| script steps. If the step is reachable and the variables are user controlled,|
| then they can be used to inject arbitrary code into the workflow.            |
| Workflow URL: https://github.com/langchain-                                  |
| ai/langchainjs/blob/main/.github/workflows/spam-comment-filter.yml           |
| Confidence: HIGH                                                             |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Job: filter_spam                                                             |
| Step: Check issue body against regex                                         |
| Variables: github.event.comment.body                                         |
|==============================================================================|

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 27, 2024
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Aug 27, 2024 0:28am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Aug 27, 2024 0:28am

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Aug 27, 2024
Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

Thank you for this!

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Aug 27, 2024
@bracesproul bracesproul changed the title fix: Sanitize body in spam filter infra[patch]: Sanitize body in spam filter Aug 27, 2024
@bracesproul bracesproul merged commit 3f9d6a2 into langchain-ai:main Aug 27, 2024
5 checks passed
@langchain-ai langchain-ai locked as spam and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants