-
-
Notifications
You must be signed in to change notification settings - Fork 143
Merge RAG usecase into HackerBuddy #111
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
Conversation
|
Thank you for your update... this looks good already. Could you also link your README.md from the project's mein readme.md? If you want to, you can also add documentation to docs.hackingbuddy (separate repository). |
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.
Copilot reviewed 16 out of 18 changed files in this pull request and generated 3 comments.
Files not reviewed (2)
- .env.example: Language not supported
- src/hackingBuddyGPT/usecases/rag/rag_storage/.gitignore: Language not supported
Comments suppressed due to low confidence (1)
src/hackingBuddyGPT/utils/openai/openai_llm.py:67
- The exception message is missing a closing parenthesis. Consider updating it to: raise Exception(f"Error from OpenAI Gateway ({response.status_code})")
raise Exception(f"Error from OpenAI Gateway ({response.status_code}")
| print("Received 408 Status Code, trying again.") | ||
| return self.get_response(prompt, azure_retry = azure_retry + 1) | ||
| else: | ||
| raise Exception(f"Error from Gateway ({response.status_code}") |
Copilot
AI
Apr 14, 2025
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.
The exception message is missing a closing parenthesis. Consider updating it to: raise Exception(f"Error from Gateway ({response.status_code})")
| raise Exception(f"Error from Gateway ({response.status_code}") | |
| raise Exception(f"Error from Gateway ({response.status_code})") |
| This usecase is an extension of `usecase/privesc`. | ||
|
|
||
| ## Setup | ||
| ### Depdendencies |
Copilot
AI
Apr 14, 2025
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.
The word 'Depdendencies' is misspelled. It should be corrected to 'Dependencies'.
| ### Depdendencies | |
| ### Dependencies |
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vectore store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). | ||
|
|
Copilot
AI
Apr 14, 2025
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.
The word 'vectore' is misspelled. It should be corrected to 'vector'.
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vectore store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). | |
| The code for the vector store setup can be found in `rag_utility.py`. Currently the vector store uses two sources: `GTFObins` and `hacktricks`. To use RAG, download the markdown files and place them in `rag_storage/GTFObinMarkdownfiles` (`rag_storage/hacktricksMarkdownFiles`). You can download the markdown files either from the respective github repository ([GTFObin](https://github.com/GTFOBins/GTFOBins.github.io/tree/master), [hacktricks](https://github.com/HackTricks-wiki/hacktricks/tree/master/src/linux-hardening/privilege-escalation)) or scrape them from their website ([GTFObin](https://gtfobins.github.io/), [hacktricks](https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html)). |
Added usecase
rag. The base architecture is the same asPrivesc, but it has several optional extensions:query_next_commandprompt.query_next_commandprompt.