tools: add checksec.sh mitigation scanner

Checksec is a bash script to check the properties of executables (like
PIE, RELRO, Canaries, ASLR, Fortify Source).  We're going to use it for
reports later.

Upstream-Status: Submitted [https://github.com/openwrt/openwrt/pull/14569]
Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
This commit is contained in:
Cedric DOURLENT 2024-02-05 09:10:48 +01:00 committed by Petr Štetiar
parent c032783471
commit d518efbf82
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -0,0 +1,27 @@
#
# Copyright (C) 2008-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=checksec.sh
PKG_SOURCE_VERSION:=36a67b388193d26289773f4153cb3b9f5bf5c9ec
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/slimm609/checksec.sh.git
PKG_MIRROR_HASH:=b1b881f68c413a69e58b79590b6a6149e6ed5b2f98ddb5bc16184fa15e8b4e77
include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
endef
define Host/Install
$(CP) $(HOST_BUILD_DIR)/checksec $(STAGING_DIR_HOST)/bin/
endef
$(eval $(call HostBuild))