Skip to content

Commit

Permalink
Merge pull request #15 from step-security/codeql
Browse files Browse the repository at this point in the history
Address Codeql issues
  • Loading branch information
varunsh-coder authored Nov 20, 2021
2 parents 6824482 + d5d19fb commit 7206db2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
11 changes: 9 additions & 2 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.

14 changes: 10 additions & 4 deletions src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ import { v4 as uuidv4 } from "uuid";
console.log(
`View security insights and recommended policy at ${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]} after the run has finished`
);
cp.execSync(`cp ${__dirname}/agent /home/agent/agent`);
let cmd = "cp",
args = [path.join(__dirname, "agent"), "/home/agent/agent"];
cp.execFileSync(cmd, args);
cp.execSync("chmod +x /home/agent/agent");

fs.writeFileSync("/home/agent/agent.json", confgStr);

cp.execSync(
`sudo cp ${__dirname}/agent.service /etc/systemd/system/agent.service`
);
cmd = "sudo";
args = [
"cp",
path.join(__dirname, "agent.service"),
"/etc/systemd/system/agent.service",
];
cp.execFileSync(cmd, args);
cp.execSync("sudo systemctl daemon-reload");
cp.execSync("sudo service agent start", { timeout: 15000 });

Expand Down

0 comments on commit 7206db2

Please sign in to comment.