git: 0a6ca5e45885 - main - security/local-php-security-checker: New port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 07 Dec 2022 14:22:34 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a6ca5e458852c41ce57a0238fcaa641ffd7cd6f

commit 0a6ca5e458852c41ce57a0238fcaa641ffd7cd6f
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-12-07 14:19:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-12-07 14:22:07 +0000

    security/local-php-security-checker: New port
    
    The Local PHP Security Checker is a command line tool that checks if
    your PHP application depends on PHP packages with known security
    vulnerabilities. It uses the Security Advisories Database behind the
    scenes availble from https://github.com/FriendsOfPHP/security-advisories
    
    PR:             261148
    Reported by:    einar@isnic.is
    Tested by:      bofh
    Approved by:    einar@isnic.is (Submitter is maintainer)
---
 security/Makefile                             |  1 +
 security/local-php-security-checker/Makefile  | 27 +++++++++++++++++++++++++++
 security/local-php-security-checker/distinfo  | 15 +++++++++++++++
 security/local-php-security-checker/pkg-descr |  4 ++++
 4 files changed, 47 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index e06ce1c14534..616591b13233 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -326,6 +326,7 @@
     SUBDIR += linux-c7-openssl-devel
     SUBDIR += linux-c7-p11-kit
     SUBDIR += linux-c7-trousers
+    SUBDIR += local-php-security-checker
     SUBDIR += logcheck
     SUBDIR += lua-bcrypt
     SUBDIR += luasec
diff --git a/security/local-php-security-checker/Makefile b/security/local-php-security-checker/Makefile
new file mode 100644
index 000000000000..d8004e9a0fae
--- /dev/null
+++ b/security/local-php-security-checker/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	local-php-security-checker
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.0.6
+CATEGORIES=	security
+MASTER_SITES=	GH
+
+MAINTAINER=	einar@isnic.is
+COMMENT=	Tool to check PHP composer dependencies for vulnerabilities
+WWW=		https://github.com/fabpot/local-php-security-checker
+
+LICENSE=	AGPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		go:modules
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	fabpot
+GH_TUPLE=	davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
+		go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \
+		hashicorp:go-version:v1.6.0:hashicorp_go_version/vendor/github.com/hashicorp/go-version \
+		mitchellh:go-homedir:v1.1.0:mitchellh_go_homedir/vendor/github.com/mitchellh/go-homedir \
+		pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \
+		stretchr:testify:v1.8.1:stretchr_testify/vendor/github.com/stretchr/testify
+
+PLIST_FILES=	bin/local-php-security-checker
+
+.include <bsd.port.mk>
diff --git a/security/local-php-security-checker/distinfo b/security/local-php-security-checker/distinfo
new file mode 100644
index 000000000000..96d41e960bc6
--- /dev/null
+++ b/security/local-php-security-checker/distinfo
@@ -0,0 +1,15 @@
+TIMESTAMP = 1670419416
+SHA256 (fabpot-local-php-security-checker-v2.0.6_GH0.tar.gz) = 7fe2748d148a6ff1922f148a0141f727161996dcbda2037ea84d466f0c719fc2
+SIZE (fabpot-local-php-security-checker-v2.0.6_GH0.tar.gz) = 22337
+SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
+SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152
+SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5
+SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173
+SHA256 (hashicorp-go-version-v1.6.0_GH0.tar.gz) = bac1ea761f4f5818f9966d7a3ecbd97d3dcc277ad5f0c4832081d36b4b0b1991
+SIZE (hashicorp-go-version-v1.6.0_GH0.tar.gz) = 15892
+SHA256 (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 646671c73a84a8dfb4a5a76b80c7b63549ffefa906524d45077301bc7da76600
+SIZE (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 3362
+SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda
+SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398
+SHA256 (stretchr-testify-v1.8.1_GH0.tar.gz) = 6749fede6c26ae66b7e7500136dbe56913b4e0679099b6c1154d2210a9a1ec00
+SIZE (stretchr-testify-v1.8.1_GH0.tar.gz) = 97670
diff --git a/security/local-php-security-checker/pkg-descr b/security/local-php-security-checker/pkg-descr
new file mode 100644
index 000000000000..dca0672b7b42
--- /dev/null
+++ b/security/local-php-security-checker/pkg-descr
@@ -0,0 +1,4 @@
+The Local PHP Security Checker is a command line tool that checks if your PHP
+application depends on PHP packages with known security vulnerabilities. It
+uses the Security Advisories Database behind the scenes availble from
+https://github.com/FriendsOfPHP/security-advisories.