aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/@actions/core/lib/core.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@actions/core/lib/core.d.ts')
-rw-r--r--node_modules/@actions/core/lib/core.d.ts27
1 files changed, 26 insertions, 1 deletions
diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts
index a0803d7..3c50c32 100644
--- a/node_modules/@actions/core/lib/core.d.ts
+++ b/node_modules/@actions/core/lib/core.d.ts
@@ -59,7 +59,32 @@ export interface AnnotationProperties {
export declare function exportVariable(name: string, val: any): void;
/**
* Registers a secret which will get masked from logs
- * @param secret value of the secret
+ *
+ * @param secret - Value of the secret to be masked
+ * @remarks
+ * This function instructs the Actions runner to mask the specified value in any
+ * logs produced during the workflow run. Once registered, the secret value will
+ * be replaced with asterisks (***) whenever it appears in console output, logs,
+ * or error messages.
+ *
+ * This is useful for protecting sensitive information such as:
+ * - API keys
+ * - Access tokens
+ * - Authentication credentials
+ * - URL parameters containing signatures (SAS tokens)
+ *
+ * Note that masking only affects future logs; any previous appearances of the
+ * secret in logs before calling this function will remain unmasked.
+ *
+ * @example
+ * ```typescript
+ * // Register an API token as a secret
+ * const apiToken = "abc123xyz456";
+ * setSecret(apiToken);
+ *
+ * // Now any logs containing this value will show *** instead
+ * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***"
+ * ```
*/
export declare function setSecret(secret: string): void;
/**