Skip to content

Introducing the Quark Agent Web Interface#678

Merged
haeter525 merged 12 commits into
ev-flow:masterfrom
pulorsok:master
Aug 31, 2024
Merged

Introducing the Quark Agent Web Interface#678
haeter525 merged 12 commits into
ev-flow:masterfrom
pulorsok:master

Conversation

@pulorsok

@pulorsok pulorsok commented Aug 29, 2024

Copy link
Copy Markdown
Member

Quark Agent - Your AI-powered Android APK Analyst

quark agent demo

With Quark Agent, you can perform analyses using only natural language. It creates Quark Script code following your ideas and adjusts the code promptly as you provide feedback.

Showcase:

Here’s a demonstration of using Quark Agent to detect the CWE-798 vulnerability in the ovaa.apk file.

Step 1: Environments Requirements

  • Make sure your Python version is 3.8 or above.

Step 2: Install Quark Agent

  • Install Quark Agent by running:
git clone https://github.com/quark-engine/quark-engine.git && cd quark-engine
pip install .[QuarkAgent]

Step 3: Prepare the Detection Rule and the Sample File

.
├── ...
├── quark                   
    ├── ...           
    ├── agent               # Put rule file and sample file here
    ├── ...                

You can download the rule file here and the sample file here.

Step 4: Add your OpenAI API key

Add your OpenAI API key in quarkAgentWeb.py

os.environ["OPENAI_API_KEY"] = 'your-api-key-here'

Step 5: Run Quark Agent

$ cd quark/agent
$ python3 quarkAgentWeb.py

# You can now chat with Quark Agent in your browser. 
# The default URL is http://127.0.0.1:5000

Open a browser and navigate to 127.0.0.1:5000 to start using Quark Agent

See more CWE detections using quark scripts and play them with Quark Agent !

@pep8speaks

pep8speaks commented Aug 29, 2024

Copy link
Copy Markdown

Hello @pulorsok! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 11:80: E501 line too long (85 > 79 characters)

Comment last updated at 2024-08-31 02:41:06 UTC

Comment thread quark/agent/quarkAgentWeb.py Fixed
@codecov

codecov Bot commented Aug 29, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 25.30120% with 62 lines in your changes missing coverage. Please review.

Project coverage is 78.63%. Comparing base (5a069de) to head (63c4a12).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
quark/agent/quarkAgentWeb.py 0.00% 44 Missing ⚠️
quark/agent/agentTools.py 50.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #678      +/-   ##
==========================================
- Coverage   79.44%   78.63%   -0.81%     
==========================================
  Files          70       71       +1     
  Lines        5555     5635      +80     
==========================================
+ Hits         4413     4431      +18     
- Misses       1142     1204      +62     
Flag Coverage Δ
unittests 78.63% <25.30%> (-0.81%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@18z

18z commented Aug 31, 2024

Copy link
Copy Markdown
Member

Quark Agent - Your AI-powered Android APK Analyst

quark agent demo

With Quark Agent, you can perform analyses using only natural language. It creates Quark Script code following your ideas and adjusts the code promptly as you provide feedback.

Showcase:

Here’s a demonstration of using Quark Agent to detect the CWE-798 vulnerability in the ovaa.apk file.

Step 1: Environments Requirements

  • Make sure your Python version is 3.8 or above.

Step 2: Install Quark Agent

  • Install Quark Agent by running:
git clone https://github.com/quark-engine/quark-engine.git & cd quark-engine
pip install .[QuarkAgent]

Step 3: Prepare the Detection Rule and the Sample File

.
├── ...
├── quark                   
    ├── ...           
    ├── agent               # Put rule file and sample file here
    ├── ...                

You can download the rule file here and the sample file here.

Step 4: Add your OpenAI API key

Add your OpenAI API key in quarkAgentWeb.py

os.environ["OPENAI_API_KEY"] = 'your-api-key-here'

Step 5: Run Quark Agent

$ python3 quark/agent/quarkAgentWeb.py

# You can now chat with Quark Agent in your browser. 
# The default URL is http://127.0.0.1:5000

Open a browser and navigate to 127.0.0.1:5000 to start using Quark Agent

See more CWE detections using quark scripts and play them with Quark Agent !

Comment thread README.md Outdated
Comment thread README.md Outdated

@haeter525 haeter525 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thank @pulorsok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants