aikido-zen 1.0.6-x86_64-darwin → 1.0.8-x86_64-darwin

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 165b83a0e7676d361b152becf0a158970360b0ca67df6954ef48f6b026d63c39
4
- data.tar.gz: 0b8c71d3b57ffc78b51ccc2a2d272d161daa3ec67ffe0d88fddbbe37b7b7f431
3
+ metadata.gz: dbc29a2e5c3b22abf38a97b7e49e4db0b6ead2aa071b3762d944fd82413a2a82
4
+ data.tar.gz: 9d115aa2a78a2d9a922b00ac759d2dfc0cfa9880b0a47374cad4f5639fc8737c
5
5
  SHA512:
6
- metadata.gz: 58cf73113a883a21a0efa418f76cdd1c42a111dba68c594a8baaf0f89fafb154142174f98839718dd067ef795ab7b62c503dc275bf6e41038c2b9a28960b22d9
7
- data.tar.gz: 124e175c3bf52e164a8a7c3daede6211b7cd5d645cfa99f859bd4703fb60accf33cb9bcba7816cbd73c2eb5cb7129b652f06af0e6b0d98c78374bc8112cb84dc
6
+ metadata.gz: 553f0d1344d7bf3f4cd7cd738c2dd80486a3bc56f9182d93679fa7f558b9f33d5326e11e56db92f80d98fd2e4cd19de22298f5e752a5a1d9a9d1dd65a1510d34
7
+ data.tar.gz: 1ddf2449fbc52f91fa13fee3a62a118773a8c801b3d2055be03bfa7cece3c2cf5b5061f91fe519cc9fafd9ca12019448c6a903d3383be9531aac23ad57f0ba61
@@ -203,7 +203,9 @@ module Aikido::Zen
203
203
  end
204
204
 
205
205
  def input
206
- Aikido::Zen::Payload::UNKNOWN_PAYLOAD
206
+ # When the payload is unknown the payload, source, and path properties
207
+ # should be undefined, not "unknown".
208
+ {}
207
209
  end
208
210
 
209
211
  def metadata
@@ -38,11 +38,19 @@ module Aikido::Zen
38
38
 
39
39
  return if @config.imds_allowed_hosts.include?(@hostname)
40
40
 
41
- @addresses.find do |candidate|
42
- DANGEROUS_ADDRESSES.any? { |address| address === candidate }
41
+ @addresses.find do |address|
42
+ DANGEROUS_ADDRESSES.any? do |dangerous_address|
43
+ # Addresses are not considered stored IMDS addresses if the address
44
+ # is the same as the hostname. (These are valid IMDS requests, not spoofed ones)
45
+ next if address == @hostname
46
+
47
+ # True if the dangerous address is address or includes the address.
48
+ dangerous_address === address
49
+ end
43
50
  end
44
51
  end
45
52
 
53
+ # A dangerous address may be an individual address or an address range.
46
54
  DANGEROUS_ADDRESSES = [
47
55
  IPAddr.new("169.254.169.254"),
48
56
  IPAddr.new("100.100.100.200"),
@@ -20,6 +20,11 @@ module Aikido::Zen
20
20
  end
21
21
 
22
22
  def block?(controller)
23
+ # The abstract controller running the callback is typically an ActionController
24
+ # but it may also be an ActionMailer. ActionMailer does not respond to request.
25
+ # This feature requires a request object to perform checks and enforce blocking.
26
+ return false unless controller.respond_to?(:request)
27
+
23
28
  context = controller.request.env[Aikido::Zen::ENV_KEY]
24
29
  request = context.request
25
30
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Aikido
4
4
  module Zen
5
- VERSION = "1.0.6"
5
+ VERSION = "1.0.8"
6
6
 
7
7
  # The version of libzen_internals that we build against.
8
8
  LIBZEN_VERSION = "0.1.48"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aikido-zen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.8
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Aikido Security
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-12-29 00:00:00.000000000 Z
11
+ date: 2026-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby