Skip to content

Commit 4090275

Browse files
committed
1.0 release
1 parent 6458c77 commit 4090275

864 files changed

Lines changed: 4325 additions & 103517 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ test-bot*/
55
.vscode copy/launch.json
66
.vscode copy/settings.json
77
third_party/*
8-
config/*
98

109
Skip to content
1110

@@ -224,4 +223,3 @@ gitignore/Python.gitignore at main · github/gitignore · GitHub
224223

225224
tests/backend/api/__pycache__/__init__.cpython-310.pyc
226225
tests/backend/api/__pycache__/__init__.cpython-310.pyc
227-
config

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Use an official Python runtime as a parent image
2+
FROM python:3.13-slim
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy the bot source code into the container
8+
COPY . /app
9+
10+
# Install any needed packages specified in requirements.txt
11+
RUN pip install --no-cache-dir -r requirements.txt
12+
13+
# Define environment variables
14+
ENV PYTHONUNBUFFERED=1
15+
16+
# Command to run the bot
17+
CMD ["python", "butler.py", "run_bot", "-c", "config" "test-bot"]

README.md

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,17 @@
1+
## Documentation Index
12

3+
Below is an index of the available documentation files:
24

3-
# Introduction
5+
### General Documentation
46

5-
PinguBot is a fuzzing bot that allows you to automate your software testing. Fuzzy testing is a technique that injects random data into software to trigger unexpected behavior. PinguBot is designed to perform a specific set of tasks that cover various aspects of fuzzing, including:
7+
- [PinguBot Documentation](docs/bot-documentation.md): Overview of PinguBot's features and usage.
8+
- [Configuration](docs/configuration.md): Details about configuring PinguBot.
69

7-
1. **Analyze**: This task runs a manually uploaded test case against a job to see if it crashes. It helps to determine if a specific test case is viable for fuzz testing.
8-
2. **Blame**: This task helps you identify the specific code that caused a problem detected during the fuzzing process. It helps to locate the root cause of an issue much more quickly than manual troubleshooting.
9-
3. **Corpus pruning**: This task minimizes a corpus to the smallest size based on coverage (libFuzzer only).
10-
4. **Fuzz**: This task runs a fuzzing session, which involves injecting random data into a piece of software to trigger unexpected behavior and find vulnerabilities.
11-
5. **Impact analysis**: This task analyzes the potential impact of vulnerabilities detected during the fuzzing process, including the probability of execution, the severity, and the possible damage if the vulnerability is exploited.
12-
6. **Minimization**: This task performs testcase minimization, which helps to reduce the time and resources required for testing.
13-
7. **Train RNN generator**: This task involves training and retraining a machine learning model in the context of fuzzing.
14-
8. **Progression testing**: This task checks if a test case still reproduces or if it's fixed. It helps to determine if previous bugs have been resolved or if new bugs have been introduced during a code change.
15-
9. **Regression testing**: This task calculates the revision range in which a crash was introduced. This helps to determine the source of the issue and the changes that need to be reverted to fix the problem.
16-
10. **Symbolize**: This task automatically generates a symbolic table for a piece of software, making it easier to analyze a bug or issue when it occurs.
17-
11. **Unpack**: This task automatically unpacks a piece of software, making it easier to analyze its behavior and detect vulnerabilities.
18-
12. **Upload reports**: This task automatically uploads the reports generated by the other tasks to a remote server for analysis and archival.
19-
13. **Variant analysis**: This task allows you to run variants of a piece of software to see how it behaves in different scenarios, making it easier to detect and fix issues.
10+
### Task Documentation
2011

21-
By automating these tasks, you can save time and increase the efficiency of your software testing process."
22-
23-
24-
25-
# Deplyment & Usage
26-
27-
[Deployment](../../docs/deployment_instructions.md) and bot usage can be handled with the [Butler command line](../../docs/butler.md#Run-Bot-Command), which is part of the Pingucrew project. For added convenience, Pingubot also includes its own Butler command line that only includes the **run_bot** command. If you're exclusively using the PinguBot repository, you'll need to install the Python dependencies before running the Butler command line.
28-
29-
```bash
30-
# create a local virtual enviroment
31-
python -m venv .venv
32-
33-
# Activate the clean enviroment
34-
source .venv/bin/activate
35-
36-
# install pip dependencies
37-
pip install -r requirements.txt
38-
```
39-
40-
41-
42-
Once all the dependencies are installed the bot can be exeuted using the following command:
43-
44-
```bash
45-
python butler.py run_bot -c configs/test/bot test-bot
46-
```
47-
48-
**Note**: that when running the `butlerrun_bot` command, a new working directory named `test-bot` is created. This directory includes the source code of the bot as well as all the files and folders from the original `bot_working_directory` folder. Additionally, the command includes the `--testing` flag, which sets the Python ROOT_DIR to the original `src/bot` folder. This allows developers to debug and modify code during the development process, without relying on the copied code. This feature is intended to provide convenience and improve the development experience.
49-
50-
# Bot Architecture
51-
52-
The bot internal details can be found in the [architecture document](docs/architecture.md).
12+
- [Analyze Task](docs/tasks/analyze_task.md): Information about the analyze task.
13+
- [Fuzz Task](docs/tasks/fuzz_task.md): Details about fuzzing sessions and strategies.
14+
- [Minimize Task](docs/tasks/minimize_task.md): Guide to test case minimization.
15+
- [Regression Task](docs/tasks/regression_task.md): Explanation of regression testing.
16+
- [Progression Task](docs/tasks/progression_task.md): Details about progression testing.
17+
- [Symbolize Task](docs/tasks/symbolize_task.md): Guide to generating symbolized stack traces.

bot_working_directory/cache/cache-b6f386a850d6639b95f04f764cb513c5078cb7da.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

bot_working_directory/env.yaml

Lines changed: 0 additions & 171 deletions
This file was deleted.

butler.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ def _setup():
7676
os.environ['PYTHONIOENCODING'] = 'UTF-8'
7777

7878
sys.path.insert(0, os.path.abspath(os.path.join('src')))
79-
from bot.system import modules
80-
modules.fix_module_search_paths()
81-
8279

8380
if __name__ == '__main__':
8481
main()

config/bot/config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
APP_ARGS: ''
2+
APP_ARGS_APPEND_TESTCASE: true
3+
APP_LAUNCH_COMMAND: ''
4+
APP_NAME: ''
5+
APP_PATH: ''
6+
APP_PATH_DEBUG: ''
7+
ASSERTS_HAVE_SECURITY_IMPLICATION: false
8+
BAD_BUILD_CHECK: true
9+
BETA_BUILD_BUCKET_PATH: ''
10+
BOT_NAME: luckycat
11+
CACHE_STORE: true
12+
CHECKS_HAVE_SECURITY_IMPLICATION: false
13+
CRASH_RETRIES: 10
14+
DATAFLOW_BUILD_BUCKET_PATH: ''
15+
ENABLE_CHECK_JNI: false
16+
ENABLE_DEBUG_CHECKS: false
17+
FAIL_RETRIES: 5
18+
FAIL_WAIT: 300
19+
FAST_WARMUP_TIMEOUT: 40
20+
FILTER_FUNCTIONAL_BUGS: false
21+
FUZZER: libFuzzer
22+
FUZZER_DIR: ''
23+
FUZZER_TIMEOUT: 5400
24+
FUZZ_TARGET_BUILD_BUCKET_PATH: ''
25+
FUZZ_TEST_TIMEOUT: 5400
26+
GCE_METADATA_TIMEOUT: 60
27+
LSAN: false
28+
MAX_FUZZ_THREADS: 4
29+
MAX_TESTCASES: 5
30+
MINIMIZE_RESOURCES: true
31+
PINGUAPI_HOST: http://127.0.0.1:8086
32+
PINGUAPI_KEY: AUTOGENERATED BY THE BACKEND WHEN A BOT IS CREATED
33+
PKG_NAME: ''
34+
PLATFORM: Linux
35+
PROCESS_POLL_INTERVAL: 0.5
36+
REINSTALL_APP_BEFORE_EACH_TASK: false
37+
RELEASE_BUILD_BUCKET_PATH: test-([0-9]+).zip
38+
REQUIRED_APP_ARGS: ''
39+
SKIP_AUTO_CLOSE_ISSUE: false
40+
SKIP_SYSTEM_TEMP_CLEANUP: false
41+
STABLE_BUILD_BUCKET_PATH: ''
42+
SYM_DEBUG_BUILD_BUCKET_PATH: ''
43+
SYM_RELEASE_BUILD_BUCKET_PATH: ''
44+
SYSTEM_BINARY_DIR: ''
45+
TESTCASES_BEFORE_STALE_PROCESS_CLEANUP: 1
46+
TEST_TIMEOUT: 10
47+
THREAD_DELAY: 0
48+
TIMEOUT_MULTIPLIER: 1
49+
TRUSTED_HOST: true
50+
UNPACK_ALL_FUZZ_TARGETS_AND_FILES: true
51+
URL_BLOCKING_OPERATIONS_TIMEOUT: 600
52+
USER_PROFILE_IN_MEMORY: true
53+
VERSION_PATTERN: ''
54+
WARMUP_TIMEOUT: 120
55+
WATCH_FOR_PROCESS_EXIT: false

config/bot/init/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Placeholder for platform-specific init scripts. Modify them to add cleanup
2+
steps you want to run after completion of a task. Examples include app
3+
specific artifacts cleanup from non-temp directories.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# Copyright 2019 Google LLC
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");

src/bot/fuzzers/libFuzzer/peach/__init__.py renamed to config/bot/init/android_kernel.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2020 Google LLC
1+
#!/bin/bash
2+
# Copyright 2019 Google LLC
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)