Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
Update enterprise agent and don't show certain domains in markdown
  • Loading branch information
varunsh-coder committed Jul 19, 2024
1 parent d7cf128 commit 89c04c1
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 16 deletions.
9 changes: 7 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions dist/pre/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pre/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/checksum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function verifyChecksum(downloadPath: string, is_tls: boolean) {

if (is_tls) {
expectedChecksum =
"e45b85e29216eb1d217aad368bdb056bbd868a308925e7b2cf9133b06ab435d0"; // checksum for tls_agent
"fa9defcf9e125a62cb29747574d6a07aee4f04153e7bce4a3c7ce29681469e92"; // checksum for tls_agent
}

if (checksum !== expectedChecksum) {
Expand Down
13 changes: 10 additions & 3 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ export const processLogLine = (
if (matches) {
const [ipAddress, domain, pid, process] = matches.slice(1);

// Check if all values are non-empty
if (pid && process && domain && ipAddress) {
// Check if all values are non-empty and domain does not end with specified patterns
if (
pid &&
process &&
domain &&
ipAddress &&
!domain.endsWith(".actions.githubusercontent.com") &&
!domain.endsWith(".blob.core.windows.net")
) {
const status = ipAddress.startsWith("54.185.253.63")
? "❌ Blocked"
: "✅ Allowed";
Expand Down Expand Up @@ -173,4 +180,4 @@ export const HARDEN_RUNNER_UNAVAILABLE_MESSAGE =
"Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";

export const ARC_RUNNER_MESSAGE =
"Workflow is currently being executed in ARC based runner";
"Workflow is currently being executed in ARC based runner";
2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ interface MonitorResponse {

if (await isTLSEnabled(context.repo.owner)) {
downloadPath = await tc.downloadTool(
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.2_linux_amd64.tar.gz"
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.3_linux_amd64.tar.gz"
);
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
} else {
Expand Down

0 comments on commit 89c04c1

Please sign in to comment.