From 17a541706b6cd686ee73e8857b75e1ef30473425 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Wed, 21 Jul 2021 21:42:35 +0100 Subject: [PATCH] Added various files including security --- Makefile | 4 ++++ SECURITY.md | 13 +++++++++++++ single_include/kompute/Kompute.hpp | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 SECURITY.md diff --git a/Makefile b/Makefile index 9bad1db60..dffc202ef 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,7 @@ mk_cmake: -DKOMPUTE_OPT_BUILD_SINGLE_HEADER=1 \ -DKOMPUTE_OPT_ENABLE_SPDLOG=1 \ -DKOMPUTE_OPT_CODE_COVERAGE=1 \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ $(MK_CMAKE_EXTRA_FLAGS) \ -G "Unix Makefiles" @@ -199,6 +200,9 @@ win_build_xxd: format: $(CLANG_FORMAT_BIN) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/include/kompute/*.hpp test/*cpp +static_scan: + cppcheck --project=build/compile_commands.json -iexternal/ + build_changelog: docker run --rm -it -v "$(PWD)":/usr/local/src/your-app -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN} ferrarimarco/github-changelog-generator:1.15.2 -u KomputeFoundation -p kompute chmod 664 CHANGELOG.md # (Read+Write, Read+Write, Read) diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..27fcc784f --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +This document provides an overview of the security policy of Kompute. + +Kompute aims to follow the two following policies: + +* Keep dependencies up to date +* Identify and address common vulnerabilities and exposures + +## Reporting a Vulnerability + +If you identify a vulnerability the best way to report it is by sending an email to the team via a@ethical.institute. The discussion can then take place there on next steps (ie updating library, reaching out to 3rd party projects, etc). + diff --git a/single_include/kompute/Kompute.hpp b/single_include/kompute/Kompute.hpp index 4d252f519..12fe9cda9 100755 --- a/single_include/kompute/Kompute.hpp +++ b/single_include/kompute/Kompute.hpp @@ -587,6 +587,8 @@ static const unsigned int shaders_glsl_logisticregression_comp_spv_len = 4816; } #endif // define SHADEROP_SHADERLOGISTICREGRESSION_HPP +// SPDX-License-Identifier: Apache-2.0 + #if VK_USE_PLATFORM_ANDROID_KHR #include #include @@ -725,6 +727,8 @@ extern py::object kp_debug, kp_info, kp_warning, kp_error; #endif // KOMPUTE_SPDLOG_ENABLED #endif // KOMPUTE_LOG_OVERRIDE +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1062,6 +1066,8 @@ class TensorT : public Tensor } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1241,6 +1247,8 @@ class Algorithm } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1301,6 +1309,8 @@ class OpBase } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1372,6 +1382,8 @@ private: } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1426,6 +1438,8 @@ class OpTensorCopy : public OpBase } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1481,6 +1495,8 @@ class OpTensorSyncDevice : public OpBase } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1538,6 +1554,8 @@ class OpTensorSyncLocal : public OpBase } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1600,6 +1618,8 @@ private: } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + #include namespace kp { @@ -1649,6 +1669,8 @@ class OpMult : public OpAlgoDispatch } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + namespace kp { /** @@ -1939,6 +1961,8 @@ class Sequence : public std::enable_shared_from_this } // End namespace kp +// SPDX-License-Identifier: Apache-2.0 + #include #include