-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(code): do NOT compile single code protocol w/o request.SelfContained
#5757
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
base: dev
Are you sure you want to change the base?
fix(code): do NOT compile single code protocol w/o request.SelfContained
#5757
Conversation
Signed-off-by: Dwi Siswanto <[email protected]>
Signed-off-by: Dwi Siswanto <[email protected]>
…tained` Signed-off-by: Dwi Siswanto <[email protected]>
Signed-off-by: Dwi Siswanto <[email protected]>
Signed-off-by: Dwi Siswanto <[email protected]> Co-authored-by: Dogan Can Bakir <[email protected]>
…pile-single-code-protocol-without-self-contained
tarunKoyalwar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while this is one way to achieve , just confirming if we want to head in this direction cc: @ehsandeep @Mzack9999
i remember that one usecase was that , code protocol can be used to run other exploits that can't be necessarily run with javascript or http
- some exploit in python which uses structs and stuff and would be difficult to achieve it in go
- other such remote exploits that have poc's but can't be run with go but still require input
^ both of these require passing http url as input ( i remember there was one such template as well ).
If we still want to keep these usecases it might be just enough to print a forced warning like we do when we run code protocol without -code flag
To your concern:
Originally posted by @dwisiswant0 in #5742 IMO, I think code-protocol-based templates should be used for the pre-exploitation stage (like building) or other generative steps. After that, they could switch to other protocols for the actual exploit stage, matching whatever protocol is used on the target. To make this even more effective, we could aim to support similar caps to Python like |
|
This pull request has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs. Please update if you wish to keep it open. |
WalkthroughA new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TemplateParser
participant CodeRequest
User->>TemplateParser: Parse template
TemplateParser->>CodeRequest: Initialize Request
TemplateParser->>CodeRequest: Set SelfContained flag (if applicable)
TemplateParser->>TemplateParser: Check for multiple protocols
CodeRequest->>CodeRequest: Compile
CodeRequest-->>TemplateParser: Validate SelfContained if single protocol
TemplateParser-->>User: Return parsed/validated template or error
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (4)📓 Common learningspkg/protocols/code/code.go (4)pkg/templates/templates.go (3)pkg/templates/compile.go (3)🔇 Additional comments (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
merge conflict |
Proposed changes
Fix #5742
TODO:
How has been this tested?
Validate:
Test:
Checklist
Summary by CodeRabbit