diff --git a/README.md b/README.md index 482d94d026..a15c207369 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,6 @@ The layer can check on a recipe-level or on an image-level. | Module | Description | Homepage | Requires | Requires inet | Run on image | Run on recipe | C | C++ | Python | Shell | Javascript | PHP | Go | Images | LUA | Spelling | Metrics | Binaries | Packages | Other formats | Security scope | Functional scope | Style scope | | --------------- | ----------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------- | ---------------------- | ------------ | ------------- | --- | --- | ------ | ----- | ---------- | --- | --- | ------ | --- | -------- | ------- | -------- | -------- | ------------- | -------------- | ---------------- | ----------- | -| alexkohler | Suite of GO analysis tools | https://github.com/alexkohler | | | | x | | | | | | | x | | | | | | | | | | x | | bandit | Scan python code for insecurities | https://github.com/PyCQA/bandit | | | x | x | | | x | | | | | | | | | | | | x | | | | bashate | Shell script linter | http://docs.openstack.org/developer/bashate/ | | | x | x | | | | x | | | | | | | | | | | | x | x | | bitbake | Bitbake issue handling | | | | x | x | | | | | | | | | | | | | x | | | x | x | @@ -243,7 +242,6 @@ each tool does have it's own benefits and flaws so don't be mad if you have 10k+ - [Suppress findings](docs/conf/suppression.md) - [Trace source files](docs/conf/tracefiles.md) - Tools - - [alexkohler](docs/conf/module/alexkohler.md) - [bandit](docs/conf/module/bandit.md) - [bashate](docs/conf/module/bashate.md) - [bitbake](docs/conf/module/bitbake.md) diff --git a/classes/sca-alexkohler.bbclass b/classes/sca-alexkohler.bbclass deleted file mode 100755 index ab8510b093..0000000000 --- a/classes/sca-alexkohler.bbclass +++ /dev/null @@ -1,105 +0,0 @@ -## SPDX-License-Identifier: BSD-2-Clause -## Copyright (c) 2019, Konrad Weihmann - -## Add ids to suppress on a recipe level -SCA_ALEXKOHLER_EXTRA_SUPPRESS ?= "" -## Add ids to lead to a fatal on a recipe level -SCA_ALEXKOHLER_EXTRA_FATAL ?= "" -## File extension filter list (whitespace separated) -SCA_ALEXKOHLER_FILE_FILTER ?= ".go" -SCA_ALEXKOHLER_MODULES ?= "noret nargs nakedret dogsled prealloc identypo unimport" - -inherit sca-conv-to-export -inherit sca-datamodel -inherit sca-global -inherit sca-helper -inherit sca-suppress -inherit sca-image-backtrack -inherit sca-tracefiles - -SCA_RAW_RESULT_FILE[alexkohler] = "txt" - -def do_sca_conv_alexkohler(d): - import os - import re - import hashlib - - package_name = d.getVar("PN") - buildpath = d.getVar("SCA_SOURCES_DIR") - - items = [] - pattern = r"^\[(?P.*)\]\s+(?P.*):(?P\d+)\s+(?P.*)" - - _suppress = sca_suppress_init(d, "SCA_ALEXKOHLER_EXTRA_SUPPRESS", - d.expand("${STAGING_DATADIR_NATIVE}/alexkohler-${SCA_MODE}-suppress")) - _findings = [] - - if os.path.exists(sca_raw_result_file(d, "alexkohler")): - with open(sca_raw_result_file(d, "alexkohler"), "r") as f: - content = f.read() - for m in re.finditer(pattern, content, re.MULTILINE): - try: - g = sca_get_model_class(d, - PackageName=package_name, - Tool="alexkohler", - BuildPath=buildpath, - File=m.group("file"), - Line=m.group("line"), - Message=m.group("msg"), - ID=m.group("id"), - Severity="warning") - if _suppress.Suppressed(g): - continue - if g.Scope not in clean_split(d, "SCA_SCOPE_FILTER"): - continue - if g.Severity in sca_allowed_warning_level(d): - _findings += sca_backtrack_findings(d, g) - except Exception as e: - sca_log_note(d, str(e)) - sca_add_model_class_list(d, _findings) - return sca_save_model_to_string(d) - -def exec_wrap_combine_txt_alexkohler(a, b, **kwargs): - b = b.replace("[", "\n[") - lines = [x.strip() for x in b.split("\n") if x and not x.startswith("running on package")] - lines = ["[{}] {}".format(kwargs["mod"], x) for x in lines] - return a + "\n".join(lines) + "\n" - -python do_sca_alexkohler() { - import os - import subprocess - - cmd_output = "" - - _files = get_files_by_extention(d, - d.getVar("SCA_SOURCES_DIR"), - clean_split(d, "SCA_ALEXKOHLER_FILE_FILTER"), - sca_filter_files(d, d.getVar("SCA_SOURCES_DIR"), clean_split(d, "SCA_FILE_FILTER_EXTRA"))) - - ## Run - cmd_output = "" - if any(_files): - for mod in clean_split(d, "SCA_ALEXKOHLER_MODULES"): - cmd_output += exec_wrap_check_output(d, [mod], _files, combine=exec_wrap_combine_txt_alexkohler, mod=mod) - with open(sca_raw_result_file(d, "alexkohler"), "w") as o: - o.write(cmd_output) -} - -python do_sca_alexkohler_report() { - import os - ## Create data model - d.setVar("SCA_DATAMODEL_STORAGE", "{}/alexkohler.dm".format(d.getVar("T"))) - dm_output = do_sca_conv_alexkohler(d) - with open(d.getVar("SCA_DATAMODEL_STORAGE"), "w") as o: - o.write(dm_output) - - sca_task_aftermath(d, "alexkohler", get_fatal_entries(d, "SCA_ALEXKOHLER_EXTRA_FATAL", - d.expand("${STAGING_DATADIR_NATIVE}/alexkohler-${SCA_MODE}-fatal"))) -} - -do_sca_alexkohler[doc] = "Lint go files with alex kohler tools" -do_sca_alexkohler_report[doc] = "Report findings from do_sca_alexkohler" -addtask do_sca_alexkohler after do_configure before do_sca_tracefiles -addtask do_sca_alexkohler_report after do_sca_tracefiles before do_sca_deploy - -DEPENDS += "alexkohler-native sca-recipe-alexkohler-rules-native" diff --git a/classes/sca-blacklist.bbclass b/classes/sca-blacklist.bbclass index 768e967e51..e73bc32a23 100644 --- a/classes/sca-blacklist.bbclass +++ b/classes/sca-blacklist.bbclass @@ -4,7 +4,6 @@ ## This class provides the configuration for blacklisting modules from certain recipes ## All configuration is described through space-separated regular expression SCA_BLACKLIST ?= ".*-native .*-cross nativesdk-.* clang" -SCA_BLACKLIST_alexkohler ?= "openssh" SCA_BLACKLIST_bandit ?= "linux-.*" SCA_BLACKLIST_bitbake ?= "" SCA_BLACKLIST_cbmc ?= "linux-.* busybox" diff --git a/classes/sca-global.bbclass b/classes/sca-global.bbclass index 60b1d6b876..5fcbac46fc 100644 --- a/classes/sca-global.bbclass +++ b/classes/sca-global.bbclass @@ -87,7 +87,6 @@ SCA_SEVERITY_TRANSFORM ?= "" ## List of overall available modules SCA_AVAILABLE_MODULES ?= "\ - alexkohler \ bandit \ bashate \ bitbake \ diff --git a/classes/sca-on-recipe.bbclass b/classes/sca-on-recipe.bbclass index 0295003d3c..9ce55f0a0d 100755 --- a/classes/sca-on-recipe.bbclass +++ b/classes/sca-on-recipe.bbclass @@ -10,7 +10,6 @@ inherit sca-blacklist inherit sca-deploy-recipe SCA_ENABLED_MODULES_RECIPE ?= "\ - alexkohler \ bandit \ bashate \ bitbake \ diff --git a/docs/conf/examples/img_complete.md b/docs/conf/examples/img_complete.md index e5df4e0591..816dfe6940 100644 --- a/docs/conf/examples/img_complete.md +++ b/docs/conf/examples/img_complete.md @@ -44,7 +44,6 @@ SCA_ENABLED_MODULES_IMAGE = "\ yamllint \ " SCA_ENABLED_MODULES_RECIPE = "\ - alexkohler \ bandit \ bashate \ bitbake \ diff --git a/docs/conf/module/alexkohler.md b/docs/conf/module/alexkohler.md deleted file mode 100644 index 231c49bd14..0000000000 --- a/docs/conf/module/alexkohler.md +++ /dev/null @@ -1,70 +0,0 @@ -# Configuration for alexkohler - -alexkohler is a collection of analyzer tools by Alex Kohler - -## Supported environments/languages - -* GO - -## Configuration - -| var | purpose | type | default | -| ------------- |:-------------:| -----:| -----: -| SCA_BLACKLIST_alexkohler | Blacklist filter for this tool | space-separated-list | "linux-*" -| SCA_ALEXKOHLER_EXTRA_FATAL | Extra error-IDs leading to build termination when found | space-separated-list | "" -| SCA_ALEXKOHLER_EXTRA_SUPPRESS | Extra error-IDs to be suppressed | space-separated-list | "" -| SCA_ALEXKOHLER_FILE_FILTER | List of file-extensions to be checked | space-separated-list | ".go" -| SCA_ALEXKOHLER_MODULES | List of tools to run | space-separated-list | "noret nargs nakedret dogsled prealloc identypo unimport" - -## Supports - -* [x] suppression of IDs -* [x] terminate build on fatal -* [x] run on recipe -* [ ] run on image -* [x] run with SCA-layer default settings (see SCA_AVAILABLE_MODULES) - -## Requires - -* [ ] requires online access - -## Known error-IDs - -* alexkohler.alexkohler.noret -* alexkohler.alexkohler.nargs -* alexkohler.alexkohler.nakedret -* alexkohler.alexkohler.dogsled -* alexkohler.alexkohler.prealloc -* alexkohler.alexkohler.identypo -* alexkohler.alexkohler.unimport - -## Checking scope - -* [ ] security -* [ ] functional defects -* [ ] compliance -* [x] style issues - -## Statistics - -* ⬛⬛⬛⬛⬛⬛⬛⬜⬜⬜ 07/10 Build Speed -* ⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛ 10/10 Execution Speed -* ⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜ 08/10 Quality - -## Score mapping - -### Error considered as security relevant - -* n.a. - -### Error considered as functional defect - -* n.a. - -### Error consired as compliance issue - -* n.a. - -### Error considered as style issue - -* alexkohler.alexkohler.* diff --git a/files/module_list.csv b/files/module_list.csv index c70b345966..003ec75494 100644 --- a/files/module_list.csv +++ b/files/module_list.csv @@ -1,5 +1,4 @@ Module,Description,Homepage,Requires,Requires inet,Run on image,Run on recipe,C,C++,Python,Shell,Javascript,PHP,Go,Images,LUA,Spelling,Metrics,Binaries,Packages,Other formats,Security scope,Functional scope,Style scope -alexkohler,Suite of GO analysis tools,https://github.com/alexkohler,,,,x,,,,,,,x,,,,,,,,,,x bandit,Scan python code for insecurities,https://github.com/PyCQA/bandit,,,x,x,,,x,,,,,,,,,,,,x,, bashate,Shell script linter,http://docs.openstack.org/developer/bashate/,,,x,x,,,,x,,,,,,,,,,,,x,x bitbake,Bitbake issue handling,,,,x,x,,,,,,,,,,,,,x,,,x,x diff --git a/recipes-go/github.com-alexkohler-dogsled-native_0.0.0-20210716154023-34d2ab9edb3d.bb b/recipes-go/github.com-alexkohler-dogsled-native_0.0.0-20210716154023-34d2ab9edb3d.bb deleted file mode 100644 index 248f5761ff..0000000000 --- a/recipes-go/github.com-alexkohler-dogsled-native_0.0.0-20210716154023-34d2ab9edb3d.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/dogsled" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/dogsled" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-dogsled-sources.inc - -GO_IMPORT = "github.com/alexkohler/dogsled" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-dogsled-sources.inc b/recipes-go/github.com-alexkohler-dogsled-sources.inc deleted file mode 100644 index eb5a4f678d..0000000000 --- a/recipes-go/github.com-alexkohler-dogsled-sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/dogsled/@v/v0.0.0-20210716154023-34d2ab9edb3d.zip;srcoutput=github.com/alexkohler/dogsled;srcinput=github.com/alexkohler/dogsled@v0.0.0-20210716154023-34d2ab9edb3d;downloadfilename=github-com-alexkohler-dogsled-0.0.0-20210716154023-34d2ab9edb3d.zip;name=github-com-alexkohler-dogsled" -SRC_URI[github-com-alexkohler-dogsled.sha256sum] = "01523db2e7d5f34364dbccc47842f9532a0307e8a8b17c2483b65c927e34fae1" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/dogsled/LICENSE;md5=55bfb4256a903d5c2d6be3e909894bef \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-dogsled-sources.inc" - diff --git a/recipes-go/github.com-alexkohler-identypo-native_0.0.0-20180915162145-dcb8a7984045.bb b/recipes-go/github.com-alexkohler-identypo-native_0.0.0-20180915162145-dcb8a7984045.bb deleted file mode 100644 index d6b861a2e5..0000000000 --- a/recipes-go/github.com-alexkohler-identypo-native_0.0.0-20180915162145-dcb8a7984045.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/identypo" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/identypo" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-identypo-sources.inc - -EXTRA_DEPENDS += "\ - github.com-client9-misspell-native \ - github.com-fatih-camelcase-native \ -" - -GO_IMPORT = "github.com/alexkohler/identypo" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-identypo-sources.inc b/recipes-go/github.com-alexkohler-identypo-sources.inc deleted file mode 100644 index 513fd86d0c..0000000000 --- a/recipes-go/github.com-alexkohler-identypo-sources.inc +++ /dev/null @@ -1,14 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/identypo/@v/v0.0.0-20180915162145-dcb8a7984045.zip;srcoutput=github.com/alexkohler/identypo;srcinput=github.com/alexkohler/identypo@v0.0.0-20180915162145-dcb8a7984045;downloadfilename=github-com-alexkohler-identypo-0.0.0-20180915162145-dcb8a7984045.zip;name=github-com-alexkohler-identypo" -SRC_URI[github-com-alexkohler-identypo.sha256sum] = "4cd1e5eace0bde3d318e1bfd300a65d6326bcec1579fd28d3f6853df68b3761e" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/identypo/LICENSE;md5=55bfb4256a903d5c2d6be3e909894bef \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-identypo-sources.inc" - -require ${@bb.utils.contains('GOSRC_INCLUDEGUARD', 'github.com-client9-misspell-sources.inc', '', 'github.com-client9-misspell-sources.inc', d)} -require ${@bb.utils.contains('GOSRC_INCLUDEGUARD', 'github.com-fatih-camelcase-sources.inc', '', 'github.com-fatih-camelcase-sources.inc', d)} diff --git a/recipes-go/github.com-alexkohler-nakedret-native_1.0.0.bb b/recipes-go/github.com-alexkohler-nakedret-native_1.0.0.bb deleted file mode 100644 index bdfe4e8103..0000000000 --- a/recipes-go/github.com-alexkohler-nakedret-native_1.0.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/nakedret" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/nakedret" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-nakedret-sources.inc - -GO_IMPORT = "github.com/alexkohler/nakedret" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-nakedret-sources.inc b/recipes-go/github.com-alexkohler-nakedret-sources.inc deleted file mode 100644 index e9cab917a9..0000000000 --- a/recipes-go/github.com-alexkohler-nakedret-sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/nakedret/@v/v1.0.0.zip;srcoutput=github.com/alexkohler/nakedret;srcinput=github.com/alexkohler/nakedret@v1.0.0;downloadfilename=github-com-alexkohler-nakedret-1.0.0.zip;name=github-com-alexkohler-nakedret" -SRC_URI[github-com-alexkohler-nakedret.sha256sum] = "49085b54732ebb40eead03d29fd46b88a5a2240d90849e3d2ddc85dbf607905e" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/nakedret/LICENSE;md5=2c7b8f9e174db37605a15c992b0dc995 \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-nakedret-sources.inc" - diff --git a/recipes-go/github.com-alexkohler-nargs-native_0.0.0-20200419150446-2df8ecd3c73a.bb b/recipes-go/github.com-alexkohler-nargs-native_0.0.0-20200419150446-2df8ecd3c73a.bb deleted file mode 100644 index 6f969a4e98..0000000000 --- a/recipes-go/github.com-alexkohler-nargs-native_0.0.0-20200419150446-2df8ecd3c73a.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/nargs" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/nargs" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-nargs-sources.inc - -GO_IMPORT = "github.com/alexkohler/nargs" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-nargs-sources.inc b/recipes-go/github.com-alexkohler-nargs-sources.inc deleted file mode 100644 index 8cda568853..0000000000 --- a/recipes-go/github.com-alexkohler-nargs-sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/nargs/@v/v0.0.0-20200419150446-2df8ecd3c73a.zip;srcoutput=github.com/alexkohler/nargs;srcinput=github.com/alexkohler/nargs@v0.0.0-20200419150446-2df8ecd3c73a;downloadfilename=github-com-alexkohler-nargs-0.0.0-20200419150446-2df8ecd3c73a.zip;name=github-com-alexkohler-nargs" -SRC_URI[github-com-alexkohler-nargs.sha256sum] = "caad335519975a69088fc5ff5a63030e28c287ae11a8573b396b61cc54148a48" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/nargs/LICENSE;md5=2c7b8f9e174db37605a15c992b0dc995 \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-nargs-sources.inc" - diff --git a/recipes-go/github.com-alexkohler-noret-native_0.0.0-20190804174149-57c4d447ca7a.bb b/recipes-go/github.com-alexkohler-noret-native_0.0.0-20190804174149-57c4d447ca7a.bb deleted file mode 100644 index dd7ea183d3..0000000000 --- a/recipes-go/github.com-alexkohler-noret-native_0.0.0-20190804174149-57c4d447ca7a.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/noret" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/noret" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-noret-sources.inc - -EXTRA_DEPENDS += "\ - golang.org-x-tools-native \ -" - -GO_IMPORT = "github.com/alexkohler/noret" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-noret-sources.inc b/recipes-go/github.com-alexkohler-noret-sources.inc deleted file mode 100644 index bbff2bc2a4..0000000000 --- a/recipes-go/github.com-alexkohler-noret-sources.inc +++ /dev/null @@ -1,13 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/noret/@v/v0.0.0-20190804174149-57c4d447ca7a.zip;srcoutput=github.com/alexkohler/noret;srcinput=github.com/alexkohler/noret@v0.0.0-20190804174149-57c4d447ca7a;downloadfilename=github-com-alexkohler-noret-0.0.0-20190804174149-57c4d447ca7a.zip;name=github-com-alexkohler-noret" -SRC_URI[github-com-alexkohler-noret.sha256sum] = "beeea1d58be01a1080c49b62e4decd24c170dce97b697270c8c34688f47a6278" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/noret/LICENSE;md5=2c7b8f9e174db37605a15c992b0dc995 \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-noret-sources.inc" - -require ${@bb.utils.contains('GOSRC_INCLUDEGUARD', 'golang.org-x-tools-sources.inc', '', 'golang.org-x-tools-sources.inc', d)} diff --git a/recipes-go/github.com-alexkohler-prealloc-native_1.0.0.bb b/recipes-go/github.com-alexkohler-prealloc-native_1.0.0.bb deleted file mode 100644 index b929af3265..0000000000 --- a/recipes-go/github.com-alexkohler-prealloc-native_1.0.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/prealloc" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/prealloc" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-prealloc-sources.inc - -GO_IMPORT = "github.com/alexkohler/prealloc" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-prealloc-sources.inc b/recipes-go/github.com-alexkohler-prealloc-sources.inc deleted file mode 100644 index 5f424201d8..0000000000 --- a/recipes-go/github.com-alexkohler-prealloc-sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/prealloc/@v/v1.0.0.zip;srcoutput=github.com/alexkohler/prealloc;srcinput=github.com/alexkohler/prealloc@v1.0.0;downloadfilename=github-com-alexkohler-prealloc-1.0.0.zip;name=github-com-alexkohler-prealloc" -SRC_URI[github-com-alexkohler-prealloc.sha256sum] = "3da3c6aebc2917ecd1322724060b6aa02f0fa83eb546e07809b94e1d687aeece" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/prealloc/LICENSE;md5=2c7b8f9e174db37605a15c992b0dc995 \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-prealloc-sources.inc" - diff --git a/recipes-go/github.com-alexkohler-unimport-native_0.0.0-20171106223308-e6f2b2e2d406.bb b/recipes-go/github.com-alexkohler-unimport-native_0.0.0-20171106223308-e6f2b2e2d406.bb deleted file mode 100644 index df6893a7ea..0000000000 --- a/recipes-go/github.com-alexkohler-unimport-native_0.0.0-20171106223308-e6f2b2e2d406.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "go.mod: github.com/alexkohler/unimport" -HOMEPAGE = "https://pkg.go.dev/github.com/alexkohler/unimport" - -# License is determined by the modules included and will be therefore computed -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "${@' & '.join(sorted(set(x for x in (d.getVar('GOSRC_LICENSE') or '').split(' ') if x)))}" - -# inject the needed sources -require github.com-alexkohler-unimport-sources.inc - -GO_IMPORT = "github.com/alexkohler/unimport" - -inherit gosrc -inherit native diff --git a/recipes-go/github.com-alexkohler-unimport-sources.inc b/recipes-go/github.com-alexkohler-unimport-sources.inc deleted file mode 100644 index d68f2eaa00..0000000000 --- a/recipes-go/github.com-alexkohler-unimport-sources.inc +++ /dev/null @@ -1,12 +0,0 @@ -SRC_URI += "https://proxy.golang.org/github.com/alexkohler/unimport/@v/v0.0.0-20171106223308-e6f2b2e2d406.zip;srcoutput=github.com/alexkohler/unimport;srcinput=github.com/alexkohler/unimport@v0.0.0-20171106223308-e6f2b2e2d406;downloadfilename=github-com-alexkohler-unimport-0.0.0-20171106223308-e6f2b2e2d406.zip;name=github-com-alexkohler-unimport" -SRC_URI[github-com-alexkohler-unimport.sha256sum] = "06975e39670577ae96653bd5a6b29f8882be447c7e2d46c12444302067e7ca7f" - -GOSRC_LICENSE += "\ - MIT \ -" -LIC_FILES_CHKSUM += "\ - file://src/github.com/alexkohler/unimport/LICENSE;md5=2c7b8f9e174db37605a15c992b0dc995 \ -" - -GOSRC_INCLUDEGUARD += "github.com-alexkohler-unimport-sources.inc" - diff --git a/recipes-sca-rules/sca-recipe-alexkohler-rules-native/files/fatal b/recipes-sca-rules/sca-recipe-alexkohler-rules-native/files/fatal deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/recipes-sca-rules/sca-recipe-alexkohler-rules-native/files/suppress b/recipes-sca-rules/sca-recipe-alexkohler-rules-native/files/suppress deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/recipes-sca-rules/sca-recipe-alexkohler-rules-native/sca-recipe-alexkohler-rules-native_1.0.bb b/recipes-sca-rules/sca-recipe-alexkohler-rules-native/sca-recipe-alexkohler-rules-native_1.0.bb deleted file mode 100755 index 64063c4f06..0000000000 --- a/recipes-sca-rules/sca-recipe-alexkohler-rules-native/sca-recipe-alexkohler-rules-native_1.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "SCA ruleset for alexkohler at recipes" -DESCRIPTION = "Rules to configure how alexkohler is affecting the build" - -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://${SCA_LAYERDIR}/LICENSE;md5=a4a2bbea1db029f21b3a328c7a059172" - -SRC_URI = "file://suppress \ - file://fatal" - -inherit native - -do_install() { - install -d "${D}${datadir}" - install "${WORKDIR}/fatal" "${D}${datadir}/alexkohler-recipe-fatal" - install "${WORKDIR}/suppress" "${D}${datadir}/alexkohler-recipe-suppress" -} - -FILES:${PN} = "${datadir}" diff --git a/recipes-sca/alexkohler-native/alexkohler-native_1.0.bb b/recipes-sca/alexkohler-native/alexkohler-native_1.0.bb deleted file mode 100644 index 6e6f282ad5..0000000000 --- a/recipes-sca/alexkohler-native/alexkohler-native_1.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Alex Kohler static go analyzer tools" -HOMEPAGE = "https://github.com/alexkohler" - -DEFAULT_PREFERENCE = "${SCA_DEFAULT_PREFERENCE}" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://${SCA_LAYERDIR}/LICENSE;md5=a4a2bbea1db029f21b3a328c7a059172" - -DEPENDS += "\ - github.com-alexkohler-dogsled-native \ - github.com-alexkohler-identypo-native \ - github.com-alexkohler-nakedret-native \ - github.com-alexkohler-nargs-native \ - github.com-alexkohler-noret-native \ - github.com-alexkohler-prealloc-native \ - github.com-alexkohler-unimport-native \ - " - -inherit sca-description -inherit native - -SCA_TOOL_DESCRIPTION = "alexkohler" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" diff --git a/recipes-sca/alexkohler-native/files/alexkohler.sca.description b/recipes-sca/alexkohler-native/files/alexkohler.sca.description deleted file mode 100644 index 185da312aa..0000000000 --- a/recipes-sca/alexkohler-native/files/alexkohler.sca.description +++ /dev/null @@ -1,45 +0,0 @@ -{ - "buildspeed": 7, - "execspeed": 10, - "languages": [ - "go" - ], - "uses": [ - "@go" - ], - "quality": 8, - "scope": [ - "style" - ], - "score": { - "style": [ - "alexkohler.alexkohler..*" - ] - }, - "test": { - "findings": [ - "bad-go" - ], - "no-findings": [ - "busybox" - ], - "additional-targets": [ - "github.com-alexkohler-dogsled-native", - "github.com-alexkohler-identypo-native", - "github.com-alexkohler-nakedret-native", - "github.com-alexkohler-nargs-native", - "github.com-alexkohler-noret-native", - "github.com-alexkohler-prealloc-native", - "github.com-alexkohler-unimport-native" - ], - "integration": [ - { "cmd": [ "noret", "--help" ], "returncode": 2}, - { "cmd": [ "nargs", "--help" ], "returncode": 2}, - { "cmd": [ "nakedret", "--help" ], "returncode": 2}, - { "cmd": [ "dogsled", "--help" ], "returncode": 2}, - { "cmd": [ "prealloc", "--help" ], "returncode": 2}, - { "cmd": [ "identypo", "--help" ], "returncode": 2}, - { "cmd": [ "unimport", "--help" ], "returncode": 2} - ] - } -} \ No newline at end of file diff --git a/test/lang_standard_01.txt b/test/lang_standard_01.txt index c6b62c0263..81a277dac9 100644 --- a/test/lang_standard_01.txt +++ b/test/lang_standard_01.txt @@ -1,4 +1,3 @@ -alexkohler bashate cbmc checkbashism