Skip to content

Commit e2206e6

Browse files
committed
Bazel: restrict codeql_pack zips to .zip files
1 parent 6b97161 commit e2206e6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

misc/bazel/pkg.bzl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ _imported_zips_manifest = rule(
147147
{CODEQL_PLATFORM} can be used as zip prefixes and will be expanded to the relevant codeql platform.
148148
""",
149149
attrs = {
150-
"zips": attr.label_keyed_string_dict(doc = "mapping from zip files to install prefixes", allow_files = True),
150+
"zips": attr.label_keyed_string_dict(
151+
doc = "mapping from zip files to install prefixes",
152+
allow_files = [".zip"],
153+
),
151154
} | _PLAT_DETECTION_ATTRS,
152155
)
153156

@@ -189,9 +192,12 @@ _zipmerge = rule(
189192
attrs = {
190193
"base": attr.label(
191194
doc = "Base zip file to which zips from `zips` will be merged with",
192-
allow_single_file = True,
195+
allow_single_file = [".zip"],
196+
),
197+
"zips": attr.label_keyed_string_dict(
198+
doc = "mapping from zip files to install prefixes",
199+
allow_files = [".zip"],
193200
),
194-
"zips": attr.label_keyed_string_dict(doc = "mapping from zip files to install prefixes", allow_files = True),
195201
"zip_name": attr.string(doc = "Prefix to use for the output file name"),
196202
"kind": attr.string(doc = "Which zip kind to consider", values = ["generic", "arch"]),
197203
"zip_prefix": attr.string(doc = "Prefix posix path to add to the zip contents in the archive"),

0 commit comments

Comments
 (0)