Hostile 99% github Download

google/oss-fuzz

“OSS-Fuzz - continuous fuzzing for open source software.”

Manifest hard-depends on another extension100+ functions have 50+ basic blocks

Evidence

Manifest hard-depends on another extension package.json · lines 1–32
1{
2 "name": "OSS-Fuzz",
3 "displayName": "OSS-Fuzz",
4 "description": "",
5 "version": "0.0.5",
6 "publisher": "OSS-FuzzMaintainers",
7 "icon": "images/thumbnail.png",
8 "engines": {
9 "vscode": "^1.76.0"
10 },
11 "repository": "https://github.com/google/oss-fuzz",
12 "categories": [
13 "Other"
14 ],
15 "extensionDependencies": [
16 "mindaro-dev.file-downloader"
17 ],
18 "activationEvents": [],
19 "main": "./build/src/extension.js",
20 "contributes": {
21 "configurations": [
22 {
⋯10 lines
Package depends on VS Code test runner package.json · lines 141–175
⋯4 lines
145 ]
146 },
147 "scripts": {
148 "vscode:prepublish": "npm run compile",
149 "compile": "tsc",
150 "watch": "tsc -watch -p ./",
151 "pretest": "npm run compile",
152 "lint": "gts lint",
153 "clean": "gts clean",
154 "fix": "gts fix",
155 "prepare": "npm run compile",
156 "posttest": "npm run lint"
157 },
158 "devDependencies": {
159 "@types/glob": "^8.1.0",
160 "@types/mocha": "^10.0.1",
161 "@types/node": "^14.11.2",
162 "@types/vscode": "^1.76.0",
163 "@typescript-eslint/eslint-plugin": "^5.53.0",
164 "@typescript-eslint/parser": "^5.53.0",
165 "@vscode/test-electron": "^2.2.3",
166 "eslint": "^8.34.0",
167 "glob": "^8.1.0",
168 "mocha": "^10.8.2",
169 "typescript": "~4.7.0",
170 "gts": "^3.1.1"
171 },
172 "dependencies": {
173 "@microsoft/vscode-file-downloader-api": "^1.0.1"
174 }
175}
PyInstaller packaging command build.sh · lines 1–39
1#!/bin/bash -eu
2# Copyright 2022 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16fuzzer=coverage_atheris_fuzzer.py
17fuzzer_basename=$(basename -s .py $fuzzer)
18fuzzer_package=${fuzzer_basename}.pkg
19
20# To avoid issues with Python version conflicts, or changes in environment
21# over time on the OSS-Fuzz bots, we use pyinstaller to create a standalone
22# package. Though not necessarily required for reproducing issues, this is
23# required to keep fuzzers working properly in OSS-Fuzz.
24pyinstaller --distpath $OUT --onefile --name $fuzzer_package $fuzzer
25
26# Create execution wrapper. Atheris requires that certain libraries are
27# preloaded, so this is also done here to ensure compatibility and simplify
28# test case reproduction. Since this helper script is what OSS-Fuzz will
29# actually execute, it is also always required.
30# NOTE: If you are fuzzing python-only code and do not have native C/C++
31# extensions, then remove the LD_PRELOAD line below as preloading sanitizer
32# library is not required and can lead to unexpected startup crashes.
33echo "#!/bin/sh
34# LLVMFuzzerTestOneInput for fuzzer detection.
35this_dir=\$(dirname \"\$0\")
36LD_PRELOAD=\$this_dir/sanitizer_with_fuzzer.so \
37 ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:external_symbolizer_path=\$this_dir/llvm-symbolizer:detect_leaks=0 \
38 \$this_dir/$fuzzer_package \$@" > $OUT/$fuzzer_basename
39chmod +x $OUT/$fuzzer_basename
imports os coverage_atheris_fuzzer.py · lines 1–48
1#!/usr/bin/python3
2# Copyright 2022 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16import atheris
17import json
18import os
19from unittest import mock
20import sys
21
22sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
23sys.path.append(
24 os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cifuzz'))
25
26with atheris.instrument_imports():
27 import get_coverage
28
29REPO_PATH = '/src/curl'
30PROJECT_NAME = 'curl'
31
⋯5 lines
37def TestOneInput(data):
38 try:
39 decoded_json = json.loads(data)
40 except (json.decoder.JSONDecodeError, UnicodeDecodeError):
41 # Wart
⋯7 lines
References Actions-provided GITHUB_TOKEN cflite_pr.yml · lines 1–48
1name: ClusterFuzzLite PR fuzzing
2on:
3 pull_request:
4 paths:
5 - 'infra/**'
6permissions: read-all
7jobs:
8 PR:
⋯16 lines
25 with:
26 language: python
27 github-token: ${{ secrets.GITHUB_TOKEN }}
28 sanitizer: ${{ matrix.sanitizer }}
29 # Optional but recommended: used to only run fuzzers that are affected
30 # by the PR.
31 # See later section on "Git repo for storage".
32 # storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
33 # storage-repo-branch: main # Optional. Defaults to "main"
34 # storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
⋯14 lines

Showing the top 5 files — 4 more files (171 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.