Mohak Rathod commited on
Commit ·
4eefc20
1
Parent(s): 1edb95e
feat: tabs for patch agent and explanations, XSS prevention with html.escape
Browse files- app/main.py +2 -1
app/main.py
CHANGED
|
@@ -547,7 +547,7 @@ def render_main(stats, recent_findings):
|
|
| 547 |
|
| 548 |
with graph_col:
|
| 549 |
st.markdown(
|
| 550 |
-
'<div class="
|
| 551 |
, unsafe_allow_html=True)
|
| 552 |
html_content = generate_graph() if is_neo4j_available() else None
|
| 553 |
if html_content:
|
|
@@ -611,6 +611,7 @@ def render_main(stats, recent_findings):
|
|
| 611 |
agent_result = run_agent_for_finding(finding_input)
|
| 612 |
answer=agent_result['final_answer']
|
| 613 |
display=answer[:500] +("..." if len(answer) > 500 else "")
|
|
|
|
| 614 |
st.markdown(f"""
|
| 615 |
<div style='background:#0d1117;border:1px solid #1e2d40;border-radius:6px;
|
| 616 |
padding:12px;font-family:JetBrains Mono;font-size:10px;
|
|
|
|
| 547 |
|
| 548 |
with graph_col:
|
| 549 |
st.markdown(
|
| 550 |
+
'<div class="sidebar-section">Attack Path Graph</div>'
|
| 551 |
, unsafe_allow_html=True)
|
| 552 |
html_content = generate_graph() if is_neo4j_available() else None
|
| 553 |
if html_content:
|
|
|
|
| 611 |
agent_result = run_agent_for_finding(finding_input)
|
| 612 |
answer=agent_result['final_answer']
|
| 613 |
display=answer[:500] +("..." if len(answer) > 500 else "")
|
| 614 |
+
display=html.escape(display)
|
| 615 |
st.markdown(f"""
|
| 616 |
<div style='background:#0d1117;border:1px solid #1e2d40;border-radius:6px;
|
| 617 |
padding:12px;font-family:JetBrains Mono;font-size:10px;
|