Diff of the two buildlogs: -- --- b1/build.log 2025-03-15 22:25:59.675615512 +0000 +++ b2/build.log 2025-03-15 22:29:19.514716443 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Fri Apr 17 16:48:25 -12 2026 -I: pbuilder-time-stamp: 1776487705 +I: Current time: Sun Mar 16 12:26:03 +14 2025 +I: pbuilder-time-stamp: 1742077563 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -26,54 +26,86 @@ dpkg-source: info: applying 03-fix-library-path.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/116418/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/D01_modify_environment starting +debug: Running on ionos12-i386. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Mar 15 22:26 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=22 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='i386' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="37" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=10 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='ef581ed989374c65879251f9bfc5ae6b' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='116418' - PS1='# ' - PS2='> ' + INVOCATION_ID=1735492de3104ea0a3495af2b6673bc0 + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=60076 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.4biy8xfY/pbuilderrc_A1u5 --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.4biy8xfY/b1 --logfile b1/build.log ruby-secure-headers_6.3.2-2.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://213.165.73.152:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.4biy8xfY/pbuilderrc_ykKa --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.4biy8xfY/b2 --logfile b2/build.log ruby-secure-headers_6.3.2-2.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://46.16.76.132:3128 I: uname -a - Linux ionos16-i386 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Mar 4 2025 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/116418/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Mar 4 11:20 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -284,7 +316,7 @@ Get: 161 http://deb.debian.org/debian unstable/main i386 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 162 http://deb.debian.org/debian unstable/main i386 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] Get: 163 http://deb.debian.org/debian unstable/main i386 ruby-useragent all 0.16.8-1.1 [12.0 kB] -Fetched 51.4 MB in 0s (107 MB/s) +Fetched 51.4 MB in 3s (18.8 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.13-minimal:i386. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19771 files and directories currently installed.) @@ -820,8 +852,8 @@ Setting up tzdata (2025a-2) ... Current default time zone: 'Etc/UTC' -Local time is now: Sat Apr 18 04:48:46 UTC 2026. -Universal Time is now: Sat Apr 18 04:48:46 UTC 2026. +Local time is now: Sat Mar 15 22:27:41 UTC 2025. +Universal Time is now: Sat Mar 15 22:27:41 UTC 2025. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up ruby-minitest (5.25.4-2) ... @@ -971,7 +1003,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-secure-headers-6.3.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-secure-headers_6.3.2-2_source.changes +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-secure-headers-6.3.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-secure-headers_6.3.2-2_source.changes dpkg-buildpackage: info: source package ruby-secure-headers dpkg-buildpackage: info: source version 6.3.2-2 dpkg-buildpackage: info: source distribution unstable @@ -1004,7 +1040,7 @@ │ ruby-secure-headers: Installing files and building extensions for ruby3.3 │ └──────────────────────────────────────────────────────────────────────────────┘ -/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20260417-122084-q0fcw4/gemspec +/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20250316-4671-811kbe/gemspec WARNING: License identifier 'Apache Public License 2.0' is invalid. Use an identifier from https://spdx.org/licenses or 'Nonstandard' for a nonstandard license, or set it to nil if you don't want to specify a license. @@ -1017,7 +1053,7 @@ Name: secure_headers Version: 6.3.2 File: secure_headers-6.3.2.gem -/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-secure-headers/usr/share/rubygems-integration/all /tmp/d20260417-122084-q0fcw4/secure_headers-6.3.2.gem +/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-secure-headers/usr/share/rubygems-integration/all /tmp/d20250316-4671-811kbe/secure_headers-6.3.2.gem /build/reproducible-path/ruby-secure-headers-6.3.2/debian/ruby-secure-headers/usr/share/rubygems-integration/all/gems/secure_headers-6.3.2/lib/secure_headers.rb /build/reproducible-path/ruby-secure-headers-6.3.2/debian/ruby-secure-headers/usr/share/rubygems-integration/all/gems/secure_headers-6.3.2/lib/secure_headers/configuration.rb /build/reproducible-path/ruby-secure-headers-6.3.2/debian/ruby-secure-headers/usr/share/rubygems-integration/all/gems/secure_headers-6.3.2/lib/secure_headers/hash_helper.rb @@ -1073,29 +1109,23 @@ [Coveralls] Set up the SimpleCov formatter. [Coveralls] Using SimpleCov's default settings. -Randomized with seed 25946 +Randomized with seed 36648 -SecureHeaders::ClearSiteData - validate_config! - succeeds for `nil` config - succeeds for `true` config - succeeds for opt-out config - succeeds for Array of Strings config - succeeds for empty config - fails for Array of non-String config - fails for other types of config - make_header - returns nil with nil config - returns nil with opt-out config - returns nil with empty config - returns specified types - returns all types with `true` config - make_header_value - returns a string of quoted values that are comma separated +SecureHeaders::ExpectCertificateTransparency + is expected to eq "max-age=1234, report-uri=\"https://report-uri.io/expect-ct\"" + is expected to eq "enforce, max-age=1234, report-uri=\"https://report-uri.io/expect-ct\"" + is expected to eq "enforce, max-age=1234" + is expected to eq "max-age=1234" + is expected to eq "max-age=1234" + with an invalid configuration + raises an exception with an invalid enforce value + raises an exception when max-age is not provided + raises an exception with an invalid max-age + raises an exception when configuration isn't a hash SecureHeaders::Middleware - uses named overrides sets the headers + uses named overrides respects overrides cookies allows opting out of cookie protection with OPT_OUT alone @@ -1104,232 +1134,152 @@ cookies should be flagged flags cookies as secure cookies - flags cookies from configuration - sets the secure cookie flag correctly on interleaved http/https requests disables secure cookies for non-https requests + sets the secure cookie flag correctly on interleaved http/https requests flags cookies with a combination of SameSite configurations + flags cookies from configuration -SecureHeaders::PolicyManagement - #validate_config! - accepts OPT_OUT as a script-src value - rejects anything not of the form allow-* as a sandbox value - requires all source lists to be an array of strings - accepts all keys - accepts true as a sandbox policy - performs light validation on source lists - requires :block_all_mixed_content to be a boolean value - requires :upgrade_insecure_requests to be a boolean value - requires a :default_src value - allows nil values - requires :preserve_schemes to be a truthy value - allows report_only to be set in a report-only config - requires a :script_src value - rejects anything not of the form type/subtype as a plugin-type value - accepts anything of the form allow-* as a sandbox value - accepts anything of the form type/subtype as a plugin-type value - requires :report_only to be a truthy value - doesn't allow report_only to be set in a non-report-only config - rejects unknown directives / config - #combine_policies - combines the default-src value with the override if the directive was unconfigured - overrides the :block_all_mixed_content flag - combines directives where the original value is nil and the hash is frozen - does not combine the default-src value for directives that don't fall back to default sources - overrides the report_only flag - raises an error if appending to a OPT_OUT policy +SecureHeaders::ContentSecurityPolicy + #name + when in enforce mode + is expected to eq "Content-Security-Policy" + when in report-only mode + is expected to eq "Content-Security-Policy-Report-Only" + #value + supports style-src-elem directive + supports script-src-elem directive + does not remove schemes when :preserve_schemes is true + does not add a directive if the value is an empty array (or all nil) + allows style as a require-sri-src + does not remove schemes from report-uri values + allows script and style as a require-sri-src + deprecates and escapes semicolons in directive source lists + deduplicates any source expressions + includes prefetch-src + removes nil from source lists + does not add a boolean directive if the value is false + does not add a directive if the value is nil + discards source expressions (besides unsafe-* and non-host source values) when * is present + includes navigate-to + does not emit a warning when using frame-src + does not build directives with a value of OPT_OUT (and bypasses directive requirements) + discards 'none' values if any other source expressions are present + uses a safe but non-breaking default value + does add a boolean directive if the value is true + deprecates and escapes semicolons in directive source lists + supports style-src-attr directive + creates maximally strict sandbox policy when passed no sandbox token values + supports script-src-attr directive + minifies source expressions based on overlapping wildcards + creates sandbox policy when passed valid sandbox token values + supports strict-dynamic + supports strict-dynamic and opting out of the appended 'unsafe-inline' + creates maximally strict sandbox policy when passed true + allows script as a require-sri-src + removes http/s schemes from hosts with an invalid configuration + raises an exception when SameSite strict and none enforcement modes are configured with booleans raises an exception when both only and except filters are provided - raises an exception when both only and except filters are provided to SameSite configurations - raises an exception when configured without a boolean(true or OPT_OUT)/Hash - raises an exception when SameSite lax and strict enforcement modes are configured with booleans + raises an exception when both lax and strict only filters are provided to SameSite configurations raises an exception when SameSite strict and lax enforcement modes are configured with booleans raises an exception when SameSite is not configured with a Hash - raises an exception when SameSite lax and none enforcement modes are configured with booleans - raises an exception when both lax and strict only filters are provided to SameSite configurations + raises an exception when SameSite none and lax enforcement modes are configured with booleans + raises an exception when configured with false raises an exception when SameSite none and strict enforcement modes are configured with booleans + raises an exception when SameSite lax and none enforcement modes are configured with booleans raises an exception when SameSite lax and strict enforcement modes are configured with booleans - raises an exception when SameSite none and lax enforcement modes are configured with booleans - raises an exception when SameSite strict and none enforcement modes are configured with booleans raises an exception when not configured with a Hash + raises an exception when configured without a boolean(true or OPT_OUT)/Hash raises an exception when both lax and strict only filters are provided to SameSite configurations - raises an exception when configured with false + raises an exception when both only and except filters are provided to SameSite configurations + raises an exception when SameSite lax and strict enforcement modes are configured with booleans SecureHeaders::Configuration - allows OPT_OUT - has an 'noop' override - deprecates the secure_cookies configuration - gives cookies a default config - allows me to be explicit too dup results in a copy of the default config stores an override has a default config + allows me to be explicit too + has an 'noop' override + allows OPT_OUT + deprecates the secure_cookies configuration + gives cookies a default config #named_append - raises on configuring an existing append raises when an override with the given name exists + raises on configuring an existing append #override - raises on configuring an existing override raises when a named append with the given name exists - -SecureHeaders::Cookie - prevents duplicate flagging of attributes - applies httponly, secure, and samesite by default - does not tamper with cookies when using OPT_OUT is used - preserves existing attributes - SameSite cookies - does not flag cookies as SameSite=Strict when excluded - flags SameSite=None - flags properly when both lax and strict are configured - flags SameSite=Strict when configured with a boolean - does not flag cookies as SameSite=None when excluded - does not flag cookies as SameSite=Lax when excluded - flags SameSite=Lax - flags SameSite=Strict - ignores configuration if the cookie is already flagged - samesite: true sets all cookies to samesite=lax - flags SameSite=Lax when configured with a boolean - flags SameSite=Strict when configured with a boolean - flags SameSite=None when configured with a boolean - Secure cookies - when configured with a Hash - flags cookies as Secure when whitelisted - does not flag cookies as Secure when excluded - when configured with a boolean - flags cookies as Secure - HttpOnly cookies - when configured with a Hash - does not flag cookies as HttpOnly when excluded - flags cookies as HttpOnly when whitelisted - when configured with a boolean - flags cookies as HttpOnly - -SecureHeaders::XFrameOptions - #value - is expected to eq ["X-Frame-Options", "DENY"] - is expected to eq ["X-Frame-Options", "sameorigin"] - with invalid configuration - does not allow garbage - allows ALLOW-FROM* - allows SAMEORIGIN - allows DENY - -SecureHeaders::ExpectCertificateTransparency - is expected to eq "max-age=1234" - is expected to eq "enforce, max-age=1234" - is expected to eq "enforce, max-age=1234, report-uri=\"https://report-uri.io/expect-ct\"" - is expected to eq "max-age=1234" - is expected to eq "max-age=1234, report-uri=\"https://report-uri.io/expect-ct\"" - with an invalid configuration - raises an exception when configuration isn't a hash - raises an exception with an invalid max-age - raises an exception with an invalid enforce value - raises an exception when max-age is not provided - -SecureHeaders::XDownloadOptions - is expected to eq ["X-Download-Options", "noopen"] - is expected to eq ["X-Download-Options", "noopen"] - invalid configuration values - accepts noopen - doesn't accept anything besides noopen - accepts nil - -SecureHeaders::ViewHelpers - raises an error when using previously unknown hashed content with precomputed hashes for a given file - raises an error when using hashed content without precomputed hashes - avoids calling content_security_policy_nonce internally - raises an error when using hashed content with precomputed hashes, but none for the given file - adds known hash values to the corresponding headers when the helper is used - -SecureHeaders::XPermittedCrossDomainPolicies - is expected to eq ["X-Permitted-Cross-Domain-Policies", "master-only"] - is expected to eq ["X-Permitted-Cross-Domain-Policies", "none"] - invlaid configuration values - doesn't accept invalid values - valid configuration values - accepts 'by-ftp-filename' - accepts 'master-only' - accepts nil - accepts 'by-content-type' - accepts 'all' + raises on configuring an existing override SecureHeaders::XContentTypeOptions #value is expected to eq ["X-Content-Type-Options", "nosniff"] is expected to eq ["X-Content-Type-Options", "nosniff"] invalid configuration values + accepts nil accepts nosniff doesn't accept anything besides no-sniff - accepts nil - -SecureHeaders::ReferrerPolicy - is expected to eq ["Referrer-Policy", "origin-when-cross-origin"] - is expected to eq ["Referrer-Policy", "no-referrer"] - is expected to eq ["Referrer-Policy", "origin-when-cross-origin, strict-origin-when-cross-origin"] - valid configuration values - accepts 'same-origin' - accepts array of policy values - accepts 'unsafe-url' - accepts 'strict-origin-when-cross-origin' - accepts nil - accepts 'origin' - accepts 'origin-when-cross-origin' - accepts 'no-referrer' - accepts 'no-referrer-when-downgrade' - accepts 'strict-origin' - invalid configuration values - doesn't accept invalid types - doesn't accept invalid values SecureHeaders - raises a NotYetConfiguredError if default has not been set raises and ArgumentError when referencing an override that has not been set + raises a NotYetConfiguredError if default has not been set raises a NotYetConfiguredError if trying to opt-out of unconfigured headers raises a AlreadyConfiguredError if trying to configure and default has already been set + validation + validates your xdo config upon configuration + validates your cookies config upon configuration + raises errors for unknown directives + validates your x_permitted_cross_domain_policies config upon configuration + validates your xcto config upon configuration + validates your clear site data config upon configuration + validates your csp config upon configuration + validates your referrer_policy config upon configuration + validates your hsts config upon configuration + validates your x_xss config upon configuration + validates your xfo config upon configuration #header_hash_for - allows you to opt out of individual headers via API - does not set the HSTS header if request is over HTTP allows you to override opting out - produces a hash of headers with default config allows you to opt out entirely + produces a hash of headers with default config + allows you to opt out of individual headers via API + does not set the HSTS header if request is over HTTP Overrides the current default config if default config changes during request - allows you to override X-Frame-Options settings Carries options over when using overrides + allows you to override X-Frame-Options settings content security policy - Raises an error if csp_report_only is used with `report_only: false` - does not support the deprecated `report_only: true` format - appends a nonce to the script-src when used appends a value to csp directive - appends a nonce to a missing script-src value - appends a hash to a missing script-src value + does not support the deprecated `report_only: true` format + Raises an error if csp_report_only is used with `report_only: false` supports named appends overrides non-existant directives + appends a nonce to a missing script-src value + appends a hash to a missing script-src value overrides individual directives + appends a nonce to the script-src when used setting two headers - allows appending to the report only policy + allows you to opt-out of enforced CSP + sets different headers when the configs are different allows appending to the enforced policy allows overriding the report only policy - sets different headers when the configs are different - sets identical values when the configs are the same + allows appending to both policies allows overriding both policies allows overriding the enforced policy - allows appending to both policies - allows you to opt-out of enforced CSP + allows appending to the report only policy + sets identical values when the configs are the same when inferring which config to modify + updates the enforced header when configured updates both headers if both are configured updates the report only header when configured - updates the enforced header when configured - validation - validates your xdo config upon configuration - validates your referrer_policy config upon configuration - validates your x_permitted_cross_domain_policies config upon configuration - validates your xcto config upon configuration - validates your cookies config upon configuration - validates your csp config upon configuration - validates your xfo config upon configuration - validates your clear site data config upon configuration - validates your x_xss config upon configuration - raises errors for unknown directives - validates your hsts config upon configuration + +SecureHeaders::XFrameOptions + #value + is expected to eq ["X-Frame-Options", "sameorigin"] + is expected to eq ["X-Frame-Options", "DENY"] + with invalid configuration + allows DENY + allows SAMEORIGIN + does not allow garbage + allows ALLOW-FROM* SecureHeaders::StrictTransportSecurity #value @@ -1337,64 +1287,150 @@ is expected to eq ["Strict-Transport-Security", "max-age=631138519"] with an invalid configuration with a string argument - raises an exception if max-age is not supplied raises an exception with an invalid max-age + raises an exception if max-age is not supplied raises an exception with an invalid format -SecureHeaders::ContentSecurityPolicy - #name - when in enforce mode - is expected to eq "Content-Security-Policy" - when in report-only mode - is expected to eq "Content-Security-Policy-Report-Only" - #value - allows script as a require-sri-src - deprecates and escapes semicolons in directive source lists - supports script-src-attr directive - deprecates and escapes semicolons in directive source lists - removes http/s schemes from hosts - does not remove schemes from report-uri values - supports style-src-attr directive - does not remove schemes when :preserve_schemes is true - uses a safe but non-breaking default value - includes prefetch-src - supports strict-dynamic and opting out of the appended 'unsafe-inline' - discards 'none' values if any other source expressions are present - removes nil from source lists - includes navigate-to - minifies source expressions based on overlapping wildcards - allows style as a require-sri-src - supports style-src-elem directive - creates maximally strict sandbox policy when passed true - does not add a directive if the value is an empty array (or all nil) - does not add a directive if the value is nil - deduplicates any source expressions - supports script-src-elem directive - does add a boolean directive if the value is true - allows script and style as a require-sri-src - creates maximally strict sandbox policy when passed no sandbox token values - does not emit a warning when using frame-src - creates sandbox policy when passed valid sandbox token values - supports strict-dynamic - does not add a boolean directive if the value is false - does not build directives with a value of OPT_OUT (and bypasses directive requirements) - discards source expressions (besides unsafe-* and non-host source values) when * is present - SecureHeaders::XXssProtection is expected to eq ["X-XSS-Protection", "1; mode=block"] is expected to eq ["X-XSS-Protection", "1; mode=block; report=https://www.secure.com/reports"] with invalid configuration should raise an error when providing a string that is not valid when using a hash value - should raise an error if an invalid key is supplied - should allow string values ('1' or '0' are the only valid strings) should raise an error if mode != block + should raise an error if an invalid key is supplied should raise an error if no value key is supplied + should allow string values ('1' or '0' are the only valid strings) + +SecureHeaders::ReferrerPolicy + is expected to eq ["Referrer-Policy", "origin-when-cross-origin"] + is expected to eq ["Referrer-Policy", "no-referrer"] + is expected to eq ["Referrer-Policy", "origin-when-cross-origin, strict-origin-when-cross-origin"] + valid configuration values + accepts 'no-referrer' + accepts 'unsafe-url' + accepts 'strict-origin-when-cross-origin' + accepts 'origin-when-cross-origin' + accepts 'no-referrer-when-downgrade' + accepts 'origin' + accepts nil + accepts array of policy values + accepts 'same-origin' + accepts 'strict-origin' + invalid configuration values + doesn't accept invalid values + doesn't accept invalid types + +SecureHeaders::ClearSiteData + make_header + returns nil with nil config + returns nil with opt-out config + returns all types with `true` config + returns nil with empty config + returns specified types + make_header_value + returns a string of quoted values that are comma separated + validate_config! + succeeds for `true` config + succeeds for `nil` config + succeeds for opt-out config + fails for other types of config + fails for Array of non-String config + succeeds for empty config + succeeds for Array of Strings config + +SecureHeaders::XPermittedCrossDomainPolicies + is expected to eq ["X-Permitted-Cross-Domain-Policies", "master-only"] + is expected to eq ["X-Permitted-Cross-Domain-Policies", "none"] + invlaid configuration values + doesn't accept invalid values + valid configuration values + accepts 'by-content-type' + accepts nil + accepts 'master-only' + accepts 'all' + accepts 'by-ftp-filename' + +SecureHeaders::ViewHelpers + avoids calling content_security_policy_nonce internally + raises an error when using hashed content with precomputed hashes, but none for the given file + adds known hash values to the corresponding headers when the helper is used + raises an error when using previously unknown hashed content with precomputed hashes for a given file + raises an error when using hashed content without precomputed hashes + +SecureHeaders::Cookie + preserves existing attributes + does not tamper with cookies when using OPT_OUT is used + applies httponly, secure, and samesite by default + prevents duplicate flagging of attributes + SameSite cookies + flags SameSite=Strict when configured with a boolean + flags SameSite=None when configured with a boolean + does not flag cookies as SameSite=None when excluded + flags SameSite=Strict when configured with a boolean + flags SameSite=Lax + flags SameSite=Lax when configured with a boolean + flags SameSite=Strict + flags SameSite=None + does not flag cookies as SameSite=Lax when excluded + samesite: true sets all cookies to samesite=lax + ignores configuration if the cookie is already flagged + flags properly when both lax and strict are configured + does not flag cookies as SameSite=Strict when excluded + Secure cookies + when configured with a Hash + flags cookies as Secure when whitelisted + does not flag cookies as Secure when excluded + when configured with a boolean + flags cookies as Secure + HttpOnly cookies + when configured with a Hash + flags cookies as HttpOnly when whitelisted + does not flag cookies as HttpOnly when excluded + when configured with a boolean + flags cookies as HttpOnly + +SecureHeaders::PolicyManagement + #combine_policies + does not combine the default-src value for directives that don't fall back to default sources + combines the default-src value with the override if the directive was unconfigured + overrides the :block_all_mixed_content flag + combines directives where the original value is nil and the hash is frozen + overrides the report_only flag + raises an error if appending to a OPT_OUT policy + #validate_config! + rejects anything not of the form allow-* as a sandbox value + doesn't allow report_only to be set in a non-report-only config + accepts true as a sandbox policy + performs light validation on source lists + requires :report_only to be a truthy value + requires :block_all_mixed_content to be a boolean value + allows report_only to be set in a report-only config + requires a :script_src value + accepts anything of the form allow-* as a sandbox value + rejects unknown directives / config + accepts OPT_OUT as a script-src value + requires :upgrade_insecure_requests to be a boolean value + requires :preserve_schemes to be a truthy value + accepts anything of the form type/subtype as a plugin-type value + requires all source lists to be an array of strings + allows nil values + rejects anything not of the form type/subtype as a plugin-type value + accepts all keys + requires a :default_src value + +SecureHeaders::XDownloadOptions + is expected to eq ["X-Download-Options", "noopen"] + is expected to eq ["X-Download-Options", "noopen"] + invalid configuration values + doesn't accept anything besides noopen + accepts noopen + accepts nil -Finished in 0.1838 seconds (files took 0.58359 seconds to load) +Finished in 0.8902 seconds (files took 3.07 seconds to load) 240 examples, 0 failures -Randomized with seed 25946 +Randomized with seed 36648 [Coveralls] Outside the CI environment, not sending data. @@ -1425,12 +1461,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/60076/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/116418 and its subdirectories -I: Current time: Fri Apr 17 16:48:58 -12 2026 -I: pbuilder-time-stamp: 1776487738 +I: removing directory /srv/workspace/pbuilder/60076 and its subdirectories +I: Current time: Sun Mar 16 12:29:18 +14 2025 +I: pbuilder-time-stamp: 1742077758