MCPcopy Create free account
hub / github.com/github/gh-aw / loadSafeOutputsConfig

Function loadSafeOutputsConfig

actions/setup/js/safe_output_validator.cjs:13–26  ·  view source on GitHub ↗

* Load and parse the safe outputs configuration from config.json * @returns {object} The parsed configuration object

()

Source from the content-addressed store, hash-verified

11 * @returns {object} The parsed configuration object
12 */
13function loadSafeOutputsConfig() {
14 const configPath = `${process.env.RUNNER_TEMP}/gh-aw/safeoutputs/config.json`;
15 try {
16 if (!fs.existsSync(configPath)) {
17 core.warning(`Config file not found at ${configPath}, using defaults`);
18 return {};
19 }
20 const configContent = fs.readFileSync(configPath, "utf8");
21 return JSON.parse(configContent);
22 } catch (error) {
23 core.warning(`Failed to load config: ${getErrorMessage(error)}`);
24 return {};
25 }
26}
27
28/**
29 * Get configuration for a specific safe output type

Callers 1

getSafeOutputConfigFunction · 0.70

Calls 2

getErrorMessageFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected