Skip to content

Commit 16e7eba

Browse files
author
dudcom
committed
backend update and fixes
1 parent 03790c6 commit 16e7eba

28 files changed

Lines changed: 1052 additions & 16202 deletions

Sources/Agentic_System/IkaCore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit b2bbef2ec90efe72417fbe6c4554e449b58c0cb3

Sources/Agentic_System/agents/BaseAgent.py

Lines changed: 29 additions & 264 deletions
Large diffs are not rendered by default.

Sources/Agentic_System/agents/EBG_crash.py

Lines changed: 139 additions & 190 deletions
Large diffs are not rendered by default.

Sources/Agentic_System/agents/EBG_plateau.py

Lines changed: 156 additions & 240 deletions
Large diffs are not rendered by default.

Sources/Agentic_System/agents/FoG.py

Lines changed: 92 additions & 266 deletions
Large diffs are not rendered by default.

Sources/Agentic_System/prompts/FoG-prompts/george_foreman.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ You MUST use your template tools to compare against existing templates:
4545
You MUST use RAG DB tools to verify the template aligns with known patterns:
4646
1. Use `get_runtime_db_ids` to get the list of RAG DB entries for this session
4747
2. Use `read_rag_db_id` to read relevant entries that contain program template examples, Swift code, FuzzIL code, JS versions, and execution traces
48-
3. Use `get_rag_doc` to retrieve specific RAG documents that may contain context about the targeted V8 components
48+
3. Use `search_v8_source_rag_hybrid` to retrieve source context about the targeted V8 components
4949
4. Compare the generated template against examples in the RAG DB that show successful templates targeting similar components
5050
5. Verify that the template structure matches patterns that have been proven to work in similar scenarios
5151

5252
## STAGE 3: V8 TARGETING ACCURACY VALIDATION
5353

5454
You MUST use knowledge base tools to verify V8 targeting:
55-
1. Use `search_knowledge_base` to search for information about the V8 components, functions, or code paths mentioned in the target context
55+
1. Use `search_knowledge_base_hybrid` to search for information about the V8 components, functions, or code paths mentioned in the target context
5656
2. Use `get_knowledge_doc` to retrieve detailed documentation about relevant V8 implementation details
5757
3. Verify that the template's structure (functions, loops, builds, etc.) would actually exercise the targeted V8 components
5858
4. Confirm that ProgramBuilder API calls used in the template are appropriate for the intended V8 behaviors
@@ -144,8 +144,9 @@ Your response must follow this JSON structure:
144144

145145
Remember to actively use these tools during validation:
146146
- Template tools: get_all_template_names, get_template_from_json_by_name, search_template_file_json, search_regex_template_swift, similar_template_swift, search_regex_template_fuzzil, similar_template_fuzzil
147-
- RAG DB tools: get_runtime_db_ids, read_rag_db_id, get_rag_doc
148-
- Knowledge base tools: search_knowledge_base, get_knowledge_doc
147+
- RAG DB tools: get_runtime_db_ids, read_rag_db_id
148+
- V8 source RAG tools: search_v8_source_rag_hybrid, get_v8_source_rag_doc
149+
- Knowledge base tools: search_knowledge_base_hybrid, get_knowledge_doc
149150
- Web search: web_search (when needed for additional V8 or FuzzIL information)
150151

151152
Always ensure your review is thorough, uses available tools, and is constructive. The quality of the generated Swift Program Templates directly impacts the effectiveness of the entire fuzzing campaign.

Sources/Agentic_System/prompts/FoG-prompts/pick_section.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ DO NOT RERUN "get_js_entry_data_by_name" on the entry you got from a get_random_
2323
## STAGE 1
2424
ANALYZE THE DATA ENTRY EXECUTION INFORMATION AND TRY TO THEN SEARCH FOR ADJACENT JS AND FUZZIL CODE USING search_js_file_name_by_pattern.
2525
TRY TO CONNECT EXECUTION INFORMATION FROM THE RANDOM DATA ENTRY WITH PARTS OF THE V8 CODE BASE, YOU CAN USE THE VECTOR RAG DATABASE
26-
QUERIES TO HELP YOU FIND USEFUL KEY WORDS AND IDEAS.
26+
QUERIES TO HELP YOU FIND USEFUL KEY WORDS AND IDEAS. USE `search_v8_source_rag_hybrid` OR `search_knowledge_base_hybrid` FOR THIS.
2727

2828
## STAGE 2
2929
AFTER THAT PLEASE USE THE get_js_entry_data_by_name IN ORDER TO FIGURE OUT THE INTERNAL V8 EXECUTION INFORMATION
3030

3131
## STAGE 3
32-
IN THIS STAGE YOU CAN NOW USE search_knowledge_base AND get_knowledge_doc ON TOP OF get_js_entry_data_by_name WITH THE
32+
IN THIS STAGE YOU CAN NOW USE search_knowledge_base_hybrid AND get_knowledge_doc ON TOP OF get_js_entry_data_by_name WITH THE
3333
GOAL OF FIGURING OUT A "CODE REGION" OF V8 THAT IS MEANINGFULLY EXPLOITABLE. USE THE EXECUTION DATA FROM THE DATA ENTRIES
3434
IN COMBINATION WITH THE ASSOCIATED JS AND FUZZIL TO CHOOSE THE CODE REGION.
3535

@@ -54,4 +54,3 @@ Here is the JSON object THAT YOU MUST FOLLOW please make sure to include all sec
5454

5555

5656

57-

Sources/Agentic_System/prompts/FoG-prompts/program_builder.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ NEVER GENERATE MORE THAN ONE PROGRAM TEMPLATE AT A TIME. ALWAYS MAKE SURE THE `c
1616
## STAGE 0
1717
GO THROUGH THE RAG DB WITH ALL THE PROGRAM TEMPLATE EXAMPLES, THEY HAVE PROGRAM TEMPLATE SWIFT CODE BUT ALSO THE RESULTING FUZZIL CODE
1818
AS WELL AS THE JS VERSION AND EXECUTION TRACE FROM THE V8 ENGINE. THIS SHOULD GIVE YOU A STARTING POINT REGARDING GENERATING A
19-
PROGRAM TEMPLATE YOURSELF. PLEASE USE THE VECTOR RAG DB AS YOU NEED TO QUERY INFORMATION REGARDING THE V8 CODE BASE AS WELL AS JS MDN DOCUMENTS.
19+
PROGRAM TEMPLATE YOURSELF. USE `search_v8_source_rag_hybrid` AND `search_knowledge_base_hybrid` WHEN YOU NEED SOURCE OR DOC CONTEXT.
2020
FINALLY AFTER YOU HAVE CREATED A PROGRAM TEMPLATE SEND YOUR CODE TO THE VERIFICATION AGENT "GEORGE FOREMAN"
2121

2222
MAKE SURE THE PROGRAM TEMPLATE NAME YOU PROVDE DOESN'T ALREADY EXIST BY RUNNING `list_program_templates` TO RETRIEVE THE EXISTING PROGRAM TEMPLATE NAMES LOCATED IN `ProgramTemplates.swift` and `ProgramTemplateWeights.swift`.
@@ -699,4 +699,4 @@ public let ProgramTemplates = [
699699
// Generate some more random code to (hopefully) use the parsed JSON in some interesting way.
700700
b.build(n: 25)
701701
},
702-
]
702+
]

Sources/Agentic_System/prompts/FoG-prompts/reviewer_of_code.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ If the FULL ANSWER lacks detail, doesn't identify specific code blocks, or shows
5656
## STAGE 3: CODE BLOCK VERIFICATION USING TOOLS
5757

5858
You MUST use your available tools to verify the identified code blocks:
59-
1. Use `search_rag_db` to find relevant information about identified code blocks
60-
2. Use `get_rag_doc` to retrieve specific RAG database entries referenced in the analysis
61-
3. Use `search_knowledge_base` to verify understanding of V8 components, functions, or concepts mentioned
59+
1. Use `search_v8_source_rag_hybrid` to find relevant V8 source chunks for identified code blocks
60+
2. Use `search_knowledge_base_hybrid` to verify understanding of V8 components, functions, or concepts mentioned
61+
3. Use `get_v8_source_rag_doc` to retrieve full chunk sequences for specific files when needed
6262
4. Use `get_knowledge_doc` to retrieve detailed V8 documentation for identified code regions
6363
5. Use `ripgrep` or `fuzzy_finder` to locate and verify identified code blocks in V8 source if needed
6464
6. Use `web_search` if additional information about V8 engine behaviors is needed for validation
@@ -121,7 +121,7 @@ For an analysis to be APPROVED, it must:
121121
When providing feedback (especially for REJECTED cases):
122122
- Be specific about what aspects of GOAL or FULL ANSWER need improvement
123123
- Reference specific identified code blocks that need better explanation
124-
- Point to RAG DB entries or knowledge base documents that should be consulted
124+
- Point to V8 source RAG chunks or knowledge base documents that should be consulted
125125
- Suggest specific functions, concepts, or areas to investigate in Stage 3
126126
- Provide examples of what a strong analysis should look like
127127
- Guide code_analyzer to re-query v8_search with more targeted TASK/REASON if needed

Sources/Agentic_System/prompts/FoG-prompts/root_manager.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ partially random FuzzIL code which will then be used in a complex fuzzing campai
77
The point of making these custom Agentic Program Templates is to provide a level of directed fuzzing.
88

99

10-
THIS IS NOT AFL+++, THERE ARE NO HARNESSES, PROGRAM TEMPLATES ARE AN INTERNAL COMPONENT OF FUZZILLI. PLEASE USE THE search_knowledge_base TO UNDERSTAND THEM.
10+
THIS IS NOT AFL+++, THERE ARE NO HARNESSES, PROGRAM TEMPLATES ARE AN INTERNAL COMPONENT OF FUZZILLI. PLEASE USE THE search_knowledge_base_hybrid TO UNDERSTAND THEM.
1111

1212
## CRITICAL RULES:
1313

@@ -122,4 +122,3 @@ public class ProgramTemplate: Contributor {
122122
f(b)
123123
}
124124
}
125-

0 commit comments

Comments
 (0)