25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/appdefender.rb', line 25
def self.supported()
raise '"[ERROR] appDefender SDK cannot be used together with the appDefender AWS Lambda extension."' if ENV['AWS_LAMBDA_EXEC_WRAPPER'] && ENV['AWS_LAMBDA_EXEC_WRAPPER'].include?("extrinsec-appdefender")
provider_envs = [
'AWS_EXECUTION_ENV', 'K_SERVICE', 'FUNCTION_TARGET', 'FUNCTIONS_WORKER_RUNTIME', 'CATALYST_RESOURCE_ID', '__OW_ACTION_NAME', 'ES_APP_NAME',
]
archs = ["x86_64", "arm64", "aarch64" ]
RbConfig::CONFIG['host_os'] =~ /linux/ && archs.include?(RbConfig::CONFIG['host_cpu']) && provider_envs.any? {|env| !ENV[env].nil? && !ENV[env].empty? }
end
|