Skip to content

Commit 7206db2

Browse files
Merge pull request #15 from step-security/codeql
Address Codeql issues
2 parents 6824482 + d5d19fb commit 7206db2

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

dist/pre/index.js

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pre/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,20 @@ import { v4 as uuidv4 } from "uuid";
4646
console.log(
4747
`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`
4848
);
49-
cp.execSync(`cp ${__dirname}/agent /home/agent/agent`);
49+
let cmd = "cp",
50+
args = [path.join(__dirname, "agent"), "/home/agent/agent"];
51+
cp.execFileSync(cmd, args);
5052
cp.execSync("chmod +x /home/agent/agent");
5153

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

54-
cp.execSync(
55-
`sudo cp ${__dirname}/agent.service /etc/systemd/system/agent.service`
56-
);
56+
cmd = "sudo";
57+
args = [
58+
"cp",
59+
path.join(__dirname, "agent.service"),
60+
"/etc/systemd/system/agent.service",
61+
];
62+
cp.execFileSync(cmd, args);
5763
cp.execSync("sudo systemctl daemon-reload");
5864
cp.execSync("sudo service agent start", { timeout: 15000 });
5965

0 commit comments

Comments
 (0)