Skip to content

Commit 4c84aff

Browse files
committed
Rename whitelist to allowlist in code
Rename the terms whitelist/blacklist in code and comments to allowlist/denylist. Note: Not changing the `whitelist_file` DSL term in this commit as it is a breaking change. It will be done in a separate commit. Signed-off-by: Balasankar "Balu" C <[email protected]>
1 parent e3573e7 commit 4c84aff

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
WHITELIST_LIBS = [
17+
ALLOWLIST_LIBS = [
1818
/ld-linux/,
1919
/libanl\.so/,
2020
/libc\.so/,
@@ -33,7 +33,7 @@
3333
/linux-gate\.so/,
3434
].freeze
3535

36-
ARCH_WHITELIST_LIBS = [
36+
ARCH_ALLOWLIST_LIBS = [
3737
/libanl\.so/,
3838
/libc\.so/,
3939
/libcrypt\.so/,
@@ -48,7 +48,7 @@
4848
/libutil\.so/,
4949
].freeze
5050

51-
AIX_WHITELIST_LIBS = [
51+
AIX_ALLOWLIST_LIBS = [
5252
/libpthread\.a/,
5353
/libpthreads\.a/,
5454
/libdl.a/,
@@ -58,7 +58,7 @@
5858
/unix$/,
5959
].freeze
6060

61-
OMNIOS_WHITELIST_LIBS = [
61+
OMNIOS_ALLOWLIST_LIBS = [
6262
/libc\.so\.1/,
6363
/libcrypt\./,
6464
/libcrypt\.so\.1/,
@@ -79,7 +79,7 @@
7979
/libgcc_s\.so\.1/,
8080
].freeze
8181

82-
SOLARIS_WHITELIST_LIBS = [
82+
SOLARIS_ALLOWLIST_LIBS = [
8383
/libaio\.so/,
8484
/libavl\.so/,
8585
/libcrypt_[di]\.so/,
@@ -119,7 +119,7 @@
119119
/s9_preload\.so\.1/,
120120
].freeze
121121

122-
SMARTOS_WHITELIST_LIBS = [
122+
SMARTOS_ALLOWLIST_LIBS = [
123123
/libm.so/,
124124
/libpthread.so/,
125125
/librt.so/,
@@ -141,7 +141,7 @@
141141
/libz\.so/, # while we package our own libz, this get dragged along from Solaris 11's libelf library for some reason...
142142
].freeze
143143

144-
MAC_WHITELIST_LIBS = [
144+
MAC_ALLOWLIST_LIBS = [
145145
/libobjc\.A\.dylib/,
146146
/libSystem\.B\.dylib/,
147147
/CoreFoundation/,
@@ -165,7 +165,7 @@
165165
/SystemConfiguration/,
166166
].freeze
167167

168-
FREEBSD_WHITELIST_LIBS = [
168+
FREEBSD_ALLOWLIST_LIBS = [
169169
/libc\.so/,
170170
/libgcc_s\.so/,
171171
/libcrypt\.so/,

lib/omnibus/builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
1919
require "ostruct" unless defined?(OpenStruct)
2020
require "pathname" unless defined?(Pathname)
21-
require "omnibus/whitelist"
21+
require "omnibus/allowlist"
2222

2323
module Omnibus
2424
class Builder

lib/omnibus/health_check.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616

1717
require "omnibus/sugarable"
18-
require "omnibus/whitelist"
18+
require "omnibus/allowlist"
1919
begin
2020
require "pedump"
2121
rescue LoadError
@@ -380,7 +380,7 @@ def hex
380380
end
381381

382382
#
383-
# The list of whitelisted (ignored) files from the project and softwares.
383+
# The list of allowed (ignored) files from the project and softwares.
384384
#
385385
# @return [Array<String, Regexp>]
386386
#
@@ -423,26 +423,26 @@ def read_shared_libs(command)
423423
def check_for_bad_library(bad_libs, current_library, name, linked)
424424
safe = nil
425425

426-
whitelist_libs = case Ohai["platform"]
426+
allowlist_libs = case Ohai["platform"]
427427
when "arch"
428-
ARCH_WHITELIST_LIBS
428+
ARCH_ALLOWLIST_LIBS
429429
when "mac_os_x"
430-
MAC_WHITELIST_LIBS
430+
MAC_ALLOWLIST_LIBS
431431
when "omnios"
432-
OMNIOS_WHITELIST_LIBS
432+
OMNIOS_ALLOWLIST_LIBS
433433
when "solaris2"
434-
SOLARIS_WHITELIST_LIBS
434+
SOLARIS_ALLOWLIST_LIBS
435435
when "smartos"
436-
SMARTOS_WHITELIST_LIBS
436+
SMARTOS_ALLOWLIST_LIBS
437437
when "freebsd"
438-
FREEBSD_WHITELIST_LIBS
438+
FREEBSD_ALLOWLIST_LIBS
439439
when "aix"
440-
AIX_WHITELIST_LIBS
440+
AIX_ALLOWLIST_LIBS
441441
else
442-
WHITELIST_LIBS
442+
allowlist_LIBS
443443
end
444444

445-
whitelist_libs.each do |reg|
445+
allowlist_libs.each do |reg|
446446
safe ||= true if reg.match(name)
447447
end
448448

@@ -463,7 +463,7 @@ def check_for_bad_library(bad_libs, current_library, name, linked)
463463
bad_libs[current_library][name][linked] = 1
464464
end
465465
else
466-
log.debug(log_key) { " -> PASSED: #{name} is either whitelisted or safely provided." }
466+
log.debug(log_key) { " -> PASSED: #{name} is either allowed or safely provided." }
467467
end
468468

469469
bad_libs

lib/omnibus/licensing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def local?(license)
400400
# Logs the given message as info.
401401
#
402402
# This method should only be used for detecting in a license is known or not.
403-
# In the future, we will introduce a configurable way to whitelist or blacklist
403+
# In the future, we will introduce a configurable way to allow or reject
404404
# the allowed licenses. Once we implement that we need to stop using this method.
405405
#
406406
# @param [String] message

lib/omnibus/software.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def version(val = NULL, &block)
537537
expose :version
538538

539539
#
540-
# Add a file to the healthcheck whitelist.
540+
# Add a file to the healthcheck allowlist.
541541
#
542542
# @example
543543
# whitelist_file '/path/to/file'
@@ -546,7 +546,7 @@ def version(val = NULL, &block)
546546
# the name of a file to ignore in the healthcheck
547547
#
548548
# @return [Array<String>]
549-
# the list of currently whitelisted files
549+
# the list of currently allowed files
550550
#
551551
def whitelist_file(file)
552552
file = Regexp.new(file) unless file.is_a?(Regexp)

0 commit comments

Comments
 (0)