filterscript

package
v2.3.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package filterscript holds the filter-script settings that both AI Studio and the microgateway check at startup.

Index

Constants

View Source
const EnvScriptAllowOS = "FILTER_SCRIPT_ALLOW_OS"

EnvScriptAllowOS is the switch that gives filter scripts Tengo's "os" module: environment variables (TYK_AI_SECRET_KEY among them), the file system and process execution. The Enterprise script runner reads it from the environment only; it is off unless set.

View Source
const OSModuleWarning = "SECURITY WARNING: FILTER_SCRIPT_ALLOW_OS is enabled. Filter scripts can read this process's environment variables " +
	"(including TYK_AI_SECRET_KEY), read and write files and run processes on this host. Unset it unless a script needs Tengo's os module."

OSModuleWarning is logged at startup when EnvScriptAllowOS is on.

Variables

This section is empty.

Functions

func OSModuleAllowed

func OSModuleAllowed() bool

OSModuleAllowed reports whether EnvScriptAllowOS is on, read the way the Enterprise runner reads it ("1", "true", "yes" or "on", in any case).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL