Skip to content

Commit 4b1b461

Browse files
committed
Changes based on review comments from Corey Bonnell
1 parent 81052f9 commit 4b1b461

File tree

7 files changed

+32
-25
lines changed

7 files changed

+32
-25
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025, Digicert, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
"DigiCert",
1717
"actions",
1818
"code signing",
19-
"Software Trust Manager"
19+
"Software Trust Manager",
20+
"Secure Software Manager",
21+
"Signing Manager",
22+
"App Security"
2023
],
21-
"author": "DigiCert",
22-
// CBonnell: replace with proper license name
23-
"license": "DigiCert",
24+
"author": "DigiCert Inc.",
25+
"license": "MIT",
2426
"bugs": {
2527
"url": "https://github.com/digicert/code-signing-software-trust-action/issues"
2628
},
@@ -30,7 +32,6 @@
3032
"@types/node": "^24.0.13",
3133
"rimraf": "^6.0.1",
3234
"typescript": "^5.8.3",
33-
// CBonnell: create acknowledgements section in README.md for third-party dependencies
3435
"@vercel/ncc": "^0.38.3"
3536
},
3637
"dependencies": {

src/add_execute_permission.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export async function chmod(toolPath: string) {
1010
const stat = await fs.stat(filePath);
1111
if (stat.isFile()) {
1212
// 0o755 => rwxr-xr-x (+x for owner, group, others)
13-
// CBonnell: what does this do on Windows?
13+
// anshuman-mor: This function is controlled via ToolMetadata.executePermissionRequired and not called for !Linux.
14+
// @See: tool_setup.ts
1415
await fs.chmod(filePath, 0o755);
1516
core.debug(`Added +x permission to: ${filePath}`);
1617
}

src/macos_dmg_setup.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,5 @@ export async function extractDmg(dmgFile: string, callback: archiveExtractCallba
1313

1414
await callback(volume);
1515

16-
// CBonnell: this commented-out code should be removed, or a comment added explaining why it's commented out
17-
// core.info(`Unmounting volume ${volume}`)
18-
// await exec.getExecOutput(
19-
// "hdiutil",
20-
// ["detach", volume]
21-
// ).then(rv => {
22-
// rmDir(tmpDir);
23-
// }).catch(reason => {
24-
// core.warning(`Failed to unmount volume ${volume}`);
25-
// });
2616
return volume;
2717
}

src/windows_library_setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { randomFileName, tmpDir } from './utils';
77

88
export async function setupLibraries(smtoolsPath: string) {
99
// CBonnell: consider adding error handling in the batch file
10+
// anshuman-mor: Delaying it for now, will relook into error handling later.
1011
const cspResitryCommands = `
1112
@REM For ssmcsp-x86
1213
reg add "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Cryptography\\Defaults\\Provider\\DigiCert Software Trust Manager CSP"
@@ -53,9 +54,8 @@ export async function setupLibraries(smtoolsPath: string) {
5354

5455
await exec.getExecOutput(smctl, ["windows", "ksp", "register"]);
5556

56-
// CBonnell: Consider using the built-in %SystemRoot% variable here instead of hard-coding the C: drive (will break if system drive isn't C:)
57-
const system32 = "C:\\Windows\\System32";
58-
const sysWOW64 = "C:\\Windows\\SysWOW64";
57+
const system32 = `${process.env['SystemRoot']}\\System32`;
58+
const sysWOW64 = `${process.env['SystemRoot']}\\SysWOW64`;
5959

6060
await fs.copyFile(path.join(smtoolsPath, 'smksp-x64.dll'), path.join(system32, 'smksp.dll'));
6161
await fs.copyFile(path.join(smtoolsPath, 'smksp-x86.dll'), path.join(sysWOW64, 'smksp.dll'));

src/windows_msi_setup.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ export async function installMsi(src: string, callback: archiveExtractCallback)
2525
}
2626

2727
await callback(tmpDir);
28-
// CBonnell: remove or document why commented out
29-
//rmDir(tmpDir);
3028
return tmpDir;
3129
}

src/zip_setup.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ export async function extractZip(path: string, callback: archiveExtractCallback)
66
const tmpDir = randomTmpDir();
77
const rv = await tc.extractZip(path, tmpDir);
88
await callback(rv);
9-
// CBonnell: remove or document why commented out
10-
//await rmDir(tmpDir);
119
return tmpDir;
1210
};
1311

1412
export async function extractTar(path: string, callback: archiveExtractCallback) {
1513
const tmpDir = randomTmpDir();
1614
const rv = await tc.extractTar(path, tmpDir);
1715
await callback(rv);
18-
// CBonnell: remove or document why commented out
19-
//await rmDir(tmpDir);
2016
return tmpDir;
2117
};

0 commit comments

Comments
 (0)