Skip to content
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

Host Fuzz Introspector locally in cloud experiments #176

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

DonggeLiu
Copy link
Collaborator

@DonggeLiu DonggeLiu commented Mar 22, 2024

Now: Replicates #145 to run PR experiments.
Later: Complete the TODOs to host FI locally in full experiments, which often have timeout error that are likely caused by too frequent access to public introspector.oss-fuzz.com.

This PR is ready except these TODOs:

  1. Rebase this PR after merging Make it possible to point to a local deployment of Fuzz Introspector #145.
  2. Add a flag to run_all_experiments.py to use local FI after merging Use introspector to retrieve context. #144.
  3. Pass the flag to ContextRetriever so that it can call _set_introspector_endpoints with it to use local FI.

DavidKorczynski and others added 6 commits March 6, 2024 02:47
Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: David Korczynski <david@adalogics.com>
Adds ability to set Fuzz Introspector endpoint to point to a local
deployment.

Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: David Korczynski <david@adalogics.com>
@DonggeLiu DonggeLiu added the Experiment-only A PR only to run experiments, do not merge it to main. label Mar 22, 2024
@DonggeLiu DonggeLiu marked this pull request as draft March 22, 2024 00:17
@DonggeLiu DonggeLiu changed the title Launch localhost fi Host Fuzz Introspector locally Mar 22, 2024
@DonggeLiu DonggeLiu changed the title Host Fuzz Introspector locally Host Fuzz Introspector locally in cloud experiments Mar 22, 2024
# Create (small) DB.
(cd /fi/tools/web-fuzzing-introspection/app/static/assets/db/ && \
find "/experiment/benchmark-sets/$BENCHMARK_SET" -type f -name "*.yaml" \
-exec basename {} .yaml \; | sort > must_include_small.config && \
./launch_minor_oss_fuzz.sh)

/fi/tools/web-fuzzing-introspection/.venv/bin/deactivate

touch /FI_DB_READY
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@DavidKorczynski What would be the best way to check if local FI is ready to use?
I am using this file as a naive way to mark the completion of DB creation so that another process knows when to resume.
If there is a better way, I would love to learn.

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, the easiest may be to ping it after running main.py? The following shows connection refused while loading to providing the html when the app is live.

(.venv) dav@ubuntu-main:/tmp$ wget http://localhost:8080/
--2024-03-23 14:05:04--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... failed: Connection refused.

(.venv) dav@ubuntu-main:/tmp$ wget http://localhost:8080/
--2024-03-23 14:05:05--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... failed: Connection refused.

(.venv) dav@ubuntu-main:/tmp$ wget http://localhost:8080/
--2024-03-23 14:05:06--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... failed: Connection refused.

(.venv) dav@ubuntu-main:/tmp$ wget http://localhost:8080/
--2024-03-23 14:05:07--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75079 (73K) [text/html]
Saving to: ‘index.html’
index.html                                                                               100%[===============================================================================================================================================================================================================================>]  73.32K  --.-KB/s    in 0s      
2024-03-23 14:05:07 (428 MB/s) - ‘index.html’ saved [75079/75079]




Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I will try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experiment-only A PR only to run experiments, do not merge it to main.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants