Add additional config
This commit is contained in:
parent
014b0b3377
commit
a6de31fe6e
6 changed files with 8284 additions and 185 deletions
32
action.yml
32
action.yml
|
|
@ -1,19 +1,27 @@
|
|||
name: 'Harden Runner'
|
||||
description: 'GitHub Actions Runtime Security'
|
||||
name: "Harden Runner"
|
||||
description: "GitHub Actions Runtime Security"
|
||||
inputs:
|
||||
allowed-endpoints:
|
||||
description: 'Only these endpoints will be allowed if egress-policy is set to block'
|
||||
description: "Only these endpoints will be allowed if egress-policy is set to block"
|
||||
required: false
|
||||
default: ''
|
||||
default: ""
|
||||
egress-policy:
|
||||
description: 'Policy for outbound traffic, can be either audit or block'
|
||||
description: "Policy for outbound traffic, can be either audit or block"
|
||||
required: false
|
||||
default: 'block'
|
||||
default: "block"
|
||||
disable-sudo:
|
||||
description: "Disable sudo access for the runner account"
|
||||
required: false
|
||||
default: "false"
|
||||
disable-file-monitoring:
|
||||
description: "Disable file monitoring"
|
||||
required: false
|
||||
default: "false"
|
||||
branding:
|
||||
icon: 'check-square'
|
||||
color: 'green'
|
||||
icon: "check-square"
|
||||
color: "green"
|
||||
runs:
|
||||
using: 'node12'
|
||||
pre: 'dist/pre/index.js'
|
||||
main: 'dist/index.js'
|
||||
post: 'dist/post/index.js'
|
||||
using: "node12"
|
||||
pre: "dist/pre/index.js"
|
||||
main: "dist/index.js"
|
||||
post: "dist/post/index.js"
|
||||
|
|
|
|||
12
dist/post/index.js
vendored
12
dist/post/index.js
vendored
|
|
@ -484,8 +484,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.OidcClient = void 0;
|
||||
const http_client_1 = __nccwpck_require__(925);
|
||||
const auth_1 = __nccwpck_require__(702);
|
||||
const http_client_1 = __nccwpck_require__(59);
|
||||
const auth_1 = __nccwpck_require__(402);
|
||||
const core_1 = __nccwpck_require__(186);
|
||||
class OidcClient {
|
||||
static createHttpClient(allowRetry = true, maxRetry = 10) {
|
||||
|
|
@ -599,7 +599,7 @@ exports.toCommandProperties = toCommandProperties;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 702:
|
||||
/***/ 402:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
|
@ -665,7 +665,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 925:
|
||||
/***/ 59:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
|
@ -673,7 +673,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
|
|||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const http = __nccwpck_require__(605);
|
||||
const https = __nccwpck_require__(211);
|
||||
const pm = __nccwpck_require__(443);
|
||||
const pm = __nccwpck_require__(437);
|
||||
let tunnel;
|
||||
var HttpCodes;
|
||||
(function (HttpCodes) {
|
||||
|
|
@ -1210,7 +1210,7 @@ exports.HttpClient = HttpClient;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 443:
|
||||
/***/ 437:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
|
|
|||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
8268
dist/pre/index.js
vendored
8268
dist/pre/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pre/index.js.map
vendored
2
dist/pre/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
import * as core from "@actions/core";
|
||||
import { context } from "@actions/github/lib/utils";
|
||||
import { context } from "@actions/github";
|
||||
import * as cp from "child_process";
|
||||
import * as fs from "fs";
|
||||
import * as https from "https";
|
||||
|
|
@ -27,6 +27,9 @@ import * as httpm from "@actions/http-client";
|
|||
api_url: api_url,
|
||||
allowed_endpoints: core.getInput("allowed-endpoints"),
|
||||
egress_policy: core.getInput("egress-policy"),
|
||||
disable_sudo: core.getInput("disable-sudo"),
|
||||
disable_file_monitoring: core.getInput("disable-file-monitoring"),
|
||||
private: context.payload.repository.private,
|
||||
};
|
||||
|
||||
let _http = new httpm.HttpClient();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue