Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions bazel/foreign_cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,37 @@ configure_make(
tags = ["skip_on_windows"],
)

configure_make(
name = "colm",
autogen = True,
configure_in_place = True,
configure_options = [
"AUTOMAKE=automake",
"ACLOCAL=aclocal",
"--disable-shared",
"--enable-static",
],
# Workaround for the issue with statically linked libstdc++
# using -l:libstdc++.a.
env = {
"CXXFLAGS": "-lstdc++ -Wno-unused-command-line-argument",
},
lib_source = "@net_colm_open_source_colm//:all",
out_binaries = ["colm"],
tags = ["skip_on_windows"],
)

configure_make(
name = "ragel",
autogen = True,
configure_in_place = True,
configure_options = [
"AUTOMAKE=automake",
"ACLOCAL=aclocal",
"--disable-manual",
"--disable-shared",
"--enable-static",
"--with-colm=$EXT_BUILD_DEPS/colm",
],
# Workaround for the issue with statically linked libstdc++
# using -l:libstdc++.a.
Expand All @@ -128,6 +154,7 @@ configure_make(
lib_source = "@net_colm_open_source_ragel//:all",
out_binaries = ["ragel"],
tags = ["skip_on_windows"],
deps = [":colm"],
)

# ICU used by the language detection filter (i18n).
Expand Down
11 changes: 11 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def envoy_dependencies(skip_targets = []):
_com_googlesource_googleurl()
_io_hyperscan()
_io_opentracing_cpp()
_net_colm_open_source_colm()
_net_colm_open_source_ragel()
_net_zlib()
_intel_dlb()
Expand Down Expand Up @@ -426,6 +427,16 @@ def _com_github_libevent_libevent():
actual = "@envoy//bazel/foreign_cc:event",
)

def _net_colm_open_source_colm():
external_http_archive(
name = "net_colm_open_source_colm",
build_file_content = BUILD_ALL_CONTENT,
)
native.bind(
name = "colm",
actual = "@envoy//bazel/foreign_cc:colm",
)

def _net_colm_open_source_ragel():
external_http_archive(
name = "net_colm_open_source_ragel",
Expand Down
35 changes: 31 additions & 4 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,47 @@ REPOSITORY_LOCATIONS_SPEC = dict(
release_date = "2020-07-28",
cpe = "cpe:2.3:a:libevent_project:libevent:*",
),
net_colm_open_source_colm = dict(
project_name = "Colm",
project_desc = "The Colm Programming Language",
project_url = "https://www.colm.net/open-source/colm/",
# The latest release version v0.14.7 prevents building statically (see
# https://github.com/adrian-thurston/colm/issues/146). The latest SHA includes the fix (see
# https://github.com/adrian-thurston/colm/commit/fc61ecb3a22b89864916ec538eaf04840e7dd6b5).
# TODO(zhxie): Update to the next release version when it is released.
version = "2d8ba76ddaf6634f285d0a81ee42d5ee77d084cf",
sha256 = "0399e9bef7603a8f3d94acd0b0af6b5944cc3103e586734719379d3ec09620c0",
strip_prefix = "colm-{version}",
urls = ["https://github.com/adrian-thurston/colm/archive/{version}.tar.gz"],
use_category = ["dataplane_ext"],
extensions = [
"envoy.matching.input_matchers.hyperscan",
"envoy.regex_engines.hyperscan",
],
release_date = "2021-12-28",
cpe = "N/A",
),
Comment on lines +513 to +532
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poor results on OSSF scan

scorecard --repo=https://github.com/adrian-thurston/colm
RESULTS
-------
Aggregate score: 4.8 / 10

Check scores:
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
|  SCORE  |          NAME          |             REASON             |                             DOCUMENTATION/REMEDIATION                             |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Binary-Artifacts       | no binaries found in the repo  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#binary-artifacts       |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Branch-Protection      | branch protection not enabled  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection      |
|         |                        | on development/release         |                                                                                   |
|         |                        | branches                       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | CI-Tests               | 0 out of 22 merged PRs         | https://github.com/ossf/scorecard/blob/main/docs/checks.md#ci-tests               |
|         |                        | checked by a CI test -- score  |                                                                                   |
|         |                        | normalized to 0                |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | CII-Best-Practices     | no badge detected              | https://github.com/ossf/scorecard/blob/main/docs/checks.md#cii-best-practices     |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 3 / 10  | Code-Review            | GitHub code reviews found for  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#code-review            |
|         |                        | 9 commits out of the last 30   |                                                                                   |
|         |                        | -- score normalized to 3       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Contributors           | 13 different organizations     | https://github.com/ossf/scorecard/blob/main/docs/checks.md#contributors           |
|         |                        | found -- score normalized to   |                                                                                   |
|         |                        | 10                             |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Dangerous-Workflow     | no dangerous workflow patterns | https://github.com/ossf/scorecard/blob/main/docs/checks.md#dangerous-workflow     |
|         |                        | detected                       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Dependency-Update-Tool | no update tool detected        | https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Fuzzing                | project is not fuzzed          | https://github.com/ossf/scorecard/blob/main/docs/checks.md#fuzzing                |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | License                | license file detected          | https://github.com/ossf/scorecard/blob/main/docs/checks.md#license                |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Maintained             | 0 commit(s) out of 30 and 1    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained             |
|         |                        | issue activity out of 30 found |                                                                                   |
|         |                        | in the last 90 days -- score   |                                                                                   |
|         |                        | normalized to 0                |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| ?       | Packaging              | no published package detected  | https://github.com/ossf/scorecard/blob/main/docs/checks.md#packaging              |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Pinned-Dependencies    | all dependencies are pinned    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies    |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | SAST                   | SAST tool is not run on all    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#sast                   |
|         |                        | commits -- score normalized to |                                                                                   |
|         |                        | 0                              |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 0 / 10  | Security-Policy        | security policy file not       | https://github.com/ossf/scorecard/blob/main/docs/checks.md#security-policy        |
|         |                        | detected                       |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| ?       | Signed-Releases        | no releases found              | https://github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases        |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Token-Permissions      | tokens are read-only in GitHub | https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions      |
|         |                        | workflows                      |                                                                                   |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|
| 10 / 10 | Vulnerabilities        | no vulnerabilities detected    | https://github.com/ossf/scorecard/blob/main/docs/checks.md#vulnerabilities        |
|---------|------------------------|--------------------------------|-----------------------------------------------------------------------------------|

net_colm_open_source_ragel = dict(
project_name = "Ragel",
project_desc = "Ragel State Machine Compiler",
project_url = "https://www.colm.net/open-source/ragel/",
version = "6.10",
sha256 = "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f",
# We used the stable release Ragel 6.10 previously and it is under GPLv2 license (see
# http://www.colm.net/open-source/ragel). Envoy uses its binary only as a tool for
# compiling contrib extension Hyperscan. For copyright consideration, we update Ragel to
# its development release which is under MIT license.
# The latest release version v7.0.4 is not compatible with its dependency Colm we use. The
# latest SHA includes fix for compatibility.
# TODO(zhxie): Update to the next release version when it is released.
version = "d4577c924451b331c73c8ed0af04f6efd35ac0b4",
sha256 = "fa3474d50da9c870b79b51ad43f8d11cdf05268f5ec05a602ecd5b1b5f5febb0",
strip_prefix = "ragel-{version}",
urls = ["https://www.colm.net/files/ragel/ragel-{version}.tar.gz"],
urls = ["https://github.com/adrian-thurston/ragel/archive/{version}.tar.gz"],
use_category = ["dataplane_ext"],
extensions = [
"envoy.matching.input_matchers.hyperscan",
"envoy.regex_engines.hyperscan",
],
release_date = "2017-03-24",
release_date = "2021-12-28",
cpe = "N/A",
),
# This should be removed, see https://github.com/envoyproxy/envoy/issues/13261.
Expand Down