Skip to content

Test chironda #6

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

Open
wants to merge 109 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
3f63c93
adding fuzz info
gladzeka May 31, 2023
eaa971c
findings
gladzeka May 31, 2023
16cbf54
Create manual.yml
gladzeka May 31, 2023
827657d
Update manual.yml
gladzeka May 31, 2023
84fe270
Update manual.yml
gladzeka May 31, 2023
ac3d6a6
addingID
gladzeka May 31, 2023
374059c
Create _cmake.yml
gladzeka May 31, 2023
cb05237
Create c-cpp.yml
gladzeka May 31, 2023
bce7a1c
Rename c-cpp.yml to c-c.yml
gladzeka May 31, 2023
4ea644e
Update c-c.yml
gladzeka May 31, 2023
e7b9a08
cheg
gladzeka May 31, 2023
bec46bb
Merge branch 'main' of https://github.com/gladzeka/TcpServer
gladzeka May 31, 2023
3c5888a
output
gladzeka May 31, 2023
f5a4781
Update manual.yml
gladzeka May 31, 2023
282333e
deliting cmkea
gladzeka May 31, 2023
abd00a2
del
gladzeka May 31, 2023
5e6d799
Merge branch 'main' of https://github.com/gladzeka/TcpServer
gladzeka May 31, 2023
e0a9b5c
adding actions fuzz
gladzeka May 31, 2023
fcf2467
adding buit my fuzz
gladzeka May 31, 2023
ab238ab
del
gladzeka May 31, 2023
4c7ef4c
add
gladzeka May 31, 2023
b57c512
t
gladzeka May 31, 2023
9af6f24
adding_start
gladzeka May 31, 2023
beac315
adding yml
gladzeka May 31, 2023
4842fd2
adding Integrator
gladzeka May 31, 2023
e1884a5
run1
gladzeka May 31, 2023
4c1f79f
cc
gladzeka May 31, 2023
1db3669
err
gladzeka May 31, 2023
0c464bc
ren
gladzeka May 31, 2023
a10447d
ch
gladzeka May 31, 2023
0baaea6
chaing
gladzeka May 31, 2023
6c88828
newActions
gladzeka May 31, 2023
797e33a
DelFuzz
gladzeka May 31, 2023
0920b1d
mod
gladzeka May 31, 2023
159f60b
Create cmake.yml
gladzeka May 31, 2023
6971332
addng
gladzeka May 31, 2023
2432b1c
t
gladzeka May 31, 2023
253b969
test
gladzeka May 31, 2023
d3b4e86
sum
gladzeka May 31, 2023
d45b251
cpcommand
gladzeka May 31, 2023
0d4a6a4
inde
gladzeka May 31, 2023
f93ffec
tcp
gladzeka May 31, 2023
09afece
usage
gladzeka May 31, 2023
d016786
rmv
gladzeka May 31, 2023
a302236
tt
gladzeka May 31, 2023
af67916
w
gladzeka May 31, 2023
7576aec
e
gladzeka May 31, 2023
2a54f5f
cod
gladzeka May 31, 2023
94e9469
en
gladzeka May 31, 2023
798b9b0
car
gladzeka May 31, 2023
0b57f8e
rnn
gladzeka May 31, 2023
258610e
beeeeg
gladzeka May 31, 2023
498c6e5
sudo
gladzeka May 31, 2023
5d42b7a
py
gladzeka May 31, 2023
b43bc8f
removepy
gladzeka May 31, 2023
676af9f
many
gladzeka May 31, 2023
d160b0d
more_
gladzeka May 31, 2023
6c3a2a9
tcp
gladzeka May 31, 2023
d2221fe
tudo
gladzeka May 31, 2023
d90fdb6
ggg
gladzeka May 31, 2023
2bca448
ss
gladzeka May 31, 2023
1b5542c
cd
gladzeka May 31, 2023
278dedb
bb
gladzeka May 31, 2023
46eaf62
#
gladzeka May 31, 2023
7f9d048
dubbio
gladzeka May 31, 2023
c8f4582
quindiiiiiiiiii
gladzeka May 31, 2023
05ec097
zzz
gladzeka May 31, 2023
e74f95b
many changes
gladzeka Jun 2, 2023
beefea8
coms
gladzeka Jun 2, 2023
6e247ff
all
gladzeka Jun 2, 2023
13fbba3
fuzz
gladzeka Jun 16, 2023
4061a39
changes
gladzeka Jun 17, 2023
7c3652a
Merge branch 'TestChironda' of https://github.com/gladzeka/TcpServer …
gladzeka Jun 17, 2023
d2e0628
Merge branch 'main' into TestChironda
gladzeka Jun 17, 2023
082e9e8
replacing
gladzeka Jun 17, 2023
247dcd0
add build
gladzeka Jun 17, 2023
19954a3
Merge branch 'TestChironda' of https://github.com/gladzeka/TcpServer …
gladzeka Jun 17, 2023
8cef552
te
gladzeka Jun 17, 2023
b7202cc
cs
gladzeka Jun 17, 2023
35188ce
aaa
gladzeka Jun 17, 2023
694b9af
add build
gladzeka Jun 17, 2023
8947c53
variazionebuild
gladzeka Jun 17, 2023
9eeb5fa
dddd
gladzeka Jun 17, 2023
3948a89
aaaa
gladzeka Jun 17, 2023
36f603c
changecheck out
gladzeka Jun 17, 2023
dae0316
adding changes
gladzeka Jun 17, 2023
aa389a5
a
gladzeka Jun 17, 2023
8b73670
AGAIN
gladzeka Jun 17, 2023
3946a05
aa
gladzeka Jun 17, 2023
0baac76
last
gladzeka Jun 17, 2023
5017bea
camio
gladzeka Jun 17, 2023
90c7313
many changes
gladzeka Jun 17, 2023
8a361db
ADDING POINTS
gladzeka Jun 17, 2023
69f8d8e
MOD
gladzeka Jun 17, 2023
f9a82ad
Modified build
gladzeka Jun 17, 2023
a460243
cazzzzzzzzzz
gladzeka Jun 17, 2023
e3e90c6
check
gladzeka Jun 17, 2023
04669b0
AAA
gladzeka Jun 17, 2023
f56b17d
AAA
gladzeka Jun 17, 2023
e1c0db5
FUC
gladzeka Jun 17, 2023
c277be1
AZURO
gladzeka Jun 17, 2023
8007341
okaaa
gladzeka Jun 17, 2023
0824e35
curreny
gladzeka Jun 18, 2023
05756f8
changes
gladzeka Jun 18, 2023
0ae568b
alignments fix
gladzeka Jun 18, 2023
6ce879f
ref
gladzeka Jun 18, 2023
5a798a1
try2
gladzeka Jun 18, 2023
f017930
chec
gladzeka Jun 18, 2023
4bb6933
check2
gladzeka Jun 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
107 changes: 107 additions & 0 deletions .github/workflows/Vulnerability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Vulnerability Assessment


on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches: [ main ]

env:
# The fuzzing server gRPC UR
FUZZING_SERVER_ADDRESS: grpc.code-intelligence.com:443
# The fuzzing server HTTP URL...
WEB_APP_ADDRESS: https://app.code-intelligence.com

# Directoriess in which the repository will be cloned.
CHECKOUT_DIR: checkout-dir/
CIFUZZ_DOWNLOAD_URL: "https://github.com/CodeIntelligenceTesting/cifuzz/releases/latest/download/cifuzz_installer_linux_amd64"
CIFUZZ_INSTALL_DIR: ./cifuzz
FUZZING_ARTIFACT: fuzzing-artifact.tar.gz
BUILD_TYPE: Release

jobs:
fuzz-test:
runs-on: ubuntu-latest

steps:
- id: Checkout-Repo
name: Checkout Repository
uses: actions/checkout@v2
with:
repository: gladzeka/TcpServer
ref: TestChironda/TcpServer
path: ${{ env.CHECKOUT_DIR }}

- id: SetupCmake
name: Setup Cmake
run: |
sudo apt-get install -y cmake
cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}

- id: DownloadCmake
name: Download CMakeLists.txt
run: |
curl -sSL -o CMakeLists.txt https://github.com/gladzeka/TcpServer/raw/main/CMakeLists.txt

- id: Destination
name: Create Destination Directory
run: mkdir -p /home/runner/work/TcpServer/build/

- id: install-cifuzz
name: Install cifuzz
run: |
curl --fail --silent --show-error --location -o cifuzz_installer "$CIFUZZ_DOWNLOAD_URL"
chmod u+x cifuzz_installer
./cifuzz_installer --install-dir $CIFUZZ_INSTALL_DIR

- id: Envs
name: Setup Environment
run: |
# Set up the necessary dependencies and environment for the fuzz test
# Install any required packages or tools
# Example commands:
sudo apt-get update

- id: Build
name: Build Server
run: |
cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}

- name: Build Client
run: |
# Build the client application
# Replace the command with the actual build command for your client application
# Example command:
# g++ client.cpp -o client

- name: Start Server
run: |
# Start the server before running the fuzz test
# Replace the command with the actual command to start the server
# Example command:
./server

- name: Run Fuzz Test
run: |
# Run the fuzz test on the client application
# Replace the command with the actual fuzz test command for your client application
# Example command d
./client

- name: Save Fuzz Test Results
if: always()
run: |
# Save the fuzz test results to an artifact or a file for further analysis
# Replace the command with the necessary steps to save the results
# Example command:
cp fuzz_results.txt $GITHUB_WORKSPACE/fuzz_results.txt

- name: Upload Fuzz Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Fuzz Test Results
path: ${{ env.CHECKOUT_DIR }}/results # Replace with the actual path to the fuzz test results
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"cmake.configureOnOpen": true,
"files.associations": {
"*.yml": "cpp",
"chrono": "cpp",
"system_error": "cpp",
"xlocale": "cpp"
},
"C_Cpp.errorSquiggles": "disabled"
}
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
42 changes: 42 additions & 0 deletions CMakeLists - backup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.8.1)
project(tcp_client_server)

find_package (Threads)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11")

add_library(${PROJECT_NAME}
src/tcp_client.cpp
src/tcp_server.cpp
src/client.cpp
src/pipe_ret_t.cpp
src/common.cpp)

option(SERVER_EXAMPLE "Build SERVER" ON)

if(SERVER_EXAMPLE)

add_definitions(
-DSERVER_EXAMPLE
)

add_executable(tcp_server examples/server_example.cpp)

target_link_libraries (tcp_server ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

endif()

option(CLIENT_EXAMPLE "Build CLIENT" ON)

if(CLIENT_EXAMPLE)

add_definitions(
-DCLIENT_EXAMPLE
)

add_executable(tcp_client examples/client_example.cpp)

target_link_libraries (tcp_client ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})

endif()
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.8.1)
project(tcp_client_server)

find_package (Threads)
find_package(cifuzz)
enable_fuzz_testing()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11")
Expand Down Expand Up @@ -38,5 +39,7 @@ if(CLIENT_EXAMPLE)
add_executable(tcp_client examples/client_example.cpp)

target_link_libraries (tcp_client ${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
add_fuzz_test(my_fuzz_test test/my_fuzz_test.cpp)
target_link_libraries(my_fuzz_test PRIVATE server_example)

endif()
100 changes: 100 additions & 0 deletions CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "cifuzz (Coverage)",
"displayName": "cifuzz (Coverage)",
"binaryDir": "${sourceDir}/.cifuzz-build/replayer/gcov",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CIFUZZ_ENGINE": "replayer",
"CIFUZZ_SANITIZERS": "gcov",
"CIFUZZ_TESTING": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_BUILD_RPATH_USE_ORIGIN": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "cifuzz (Fuzzing)",
"displayName": "cifuzz (Fuzzing)",
"binaryDir": "${sourceDir}/.cifuzz-build/libfuzzer/address+undefined",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CIFUZZ_ENGINE": "libfuzzer",
"CIFUZZ_SANITIZERS": "address;undefined",
"CIFUZZ_TESTING": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_BUILD_RPATH_USE_ORIGIN": {
"type": "BOOL",
"value": "ON"
}
},
"environment": {
"CC": "clang",
"CXX": "clang++"
}
},
{
"name": "cifuzz (Regression Test)",
"displayName": "cifuzz (Regression Test)",
"binaryDir": "${sourceDir}/.cifuzz-build/replayer/address+undefined",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CIFUZZ_ENGINE": "replayer",
"CIFUZZ_SANITIZERS": "address;undefined",
"CIFUZZ_TESTING": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_BUILD_RPATH_USE_ORIGIN": {
"type": "BOOL",
"value": "ON"
}
}
}
],
"buildPresets": [
{
"name": "cifuzz (Coverage)",
"displayName": "cifuzz (Coverage)",
"configurePreset": "cifuzz (Coverage)",
"configuration": "RelWithDebInfo"
},
{
"name": "cifuzz (Fuzzing)",
"displayName": "cifuzz (Fuzzing)",
"configurePreset": "cifuzz (Fuzzing)",
"configuration": "RelWithDebInfo"
},
{
"name": "cifuzz (Regression Test)",
"displayName": "cifuzz (Regression Test)",
"configurePreset": "cifuzz (Regression Test)",
"configuration": "RelWithDebInfo"
}
],
"testPresets": [
{
"name": "cifuzz (Regression Test)",
"displayName": "cifuzz (Regression Test)",
"configurePreset": "cifuzz (Regression Test)",
"filter": {
"include": {
"label": "^cifuzz_regression_test$"
}
}
}
]
}
Empty file modified build.sh
100755 → 100644
Empty file.
46 changes: 46 additions & 0 deletions cifuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Configuration for a CI Fuzz project
## Generated on 2023-05-31

## The build system used to build this project. If not set, cifuzz tries
## to detect the build system automatically.
## Valid values: "bazel", "cmake", "maven", "gradle", "other".
#build-system: cmake

## If the build system type is "other", this command is used by
## `cifuzz run` to build the fuzz test.
#build-command: "make my_fuzz_test"

## Directories containing sample inputs for the code under test.
## See https://llvm.org/docs/LibFuzzer.html#corpus
#seed-corpus-dirs:
# - path/to/seed-corpus

## A file containing input language keywords or other interesting byte
## sequences.
## See https://llvm.org/docs/LibFuzzer.html#dictionaries
#dict: path/to/dictionary.dct

## Command-line arguments to pass to libFuzzer.
## See https://llvm.org/docs/LibFuzzer.html#options
#engine-args:
# - -rss_limit_mb=4096

## Maximum time to run fuzz tests. The default is to run indefinitely.
#timeout: 30m

## By default, fuzz tests are executed in a sandbox to prevent accidental
## damage to the system. Set to false to run fuzz tests unsandboxed.
## Only supported on Linux.
#use-sandbox: false

## Set to true to print output of the `cifuzz run` command as JSON.
#print-json: true

## Set to true to disable desktop notifications
#no-notifications: true

## Set URL of the CI App
#server: https://app.code-intelligence.com

## Set the project name on the CI App
#project: my-project-1a2b3c4d
4 changes: 3 additions & 1 deletion examples/client_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
/////////////////////CLIENT EXAMPLE////////////////////////
///////////////////////////////////////////////////////////

#ifdef CLIENT_EXAMPLE
std::string message;
std::cin >> message;


#include <iostream>
#include <csignal>
Expand Down
Loading