Skip to content

Issue fix for DOSTM-7327 - Forced use of specific old version of Windows SDK breaks security compliance / functionality for newer SDK based builds #24 - Code Changes for the fix#34

Merged
vishalshanbhag-digicert merged 8 commits intomasterfrom
Issue_Fix_3_DOSTM-7327
May 28, 2025

Conversation

@vishalshanbhag-digicert
Copy link
Collaborator

Forced use of specific old version of Windows SDK breaks security compliance / functionality for newer SDK based builds #24 - Code Changes for the fix

@vishalshanbhag-digicert vishalshanbhag-digicert changed the title Issue fix for DOSTM-7327 - Issue fix for DOSTM-7327 - Forced use of specific old version of Windows SDK breaks security compliance / functionality for newer SDK based builds #24 - Code Changes for the fix May 14, 2025
break;

case con.SIGN_TOOL_SIGNTOOL:
var sign = "";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use let

var sign = "";
if (fs.existsSync(con.WIN_KIT_BASE_PATH)) {
console.log(`The WinKit directory exists!`);
let versions = utils.getAllSdkVersions(con.WIN_KIT_BASE_PATH, new Array());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also just write [] instead of new Array()

core.debug("Downloading Nuget tool");
const nugetPath = await tc.downloadTool(con.NUGET_PATH);
// Rename the file which is a GUID without extension
var folder = path.dirname(nugetPath);
Copy link
Collaborator

@partharoy-digicert partharoy-digicert May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use let

const nugetPath = await tc.downloadTool(con.NUGET_PATH);
// Rename the file which is a GUID without extension
var folder = path.dirname(nugetPath);
var fullPath = path.join(folder, "nuget.exe");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this file names be kept in some config ?

}
// Extract tar
const extractPath =
osPlat == con.OS_PLATFORM_WIN
Copy link
Collaborator

@partharoy-digicert partharoy-digicert May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is being used at multiple places, maybe you can just define a boolean constant and use that everywhere instead of using this condition to check everywhere.

osPlat == con.OS_PLATFORM_WIN

break;

case con.SIGN_TOOL_APKSIGNER:
const buildToolsVersion = process.env.BUILD_TOOLS_VERSION || "30.0.2";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fallback version "30.0.2" can stay as a config

@vishalshanbhag-digicert vishalshanbhag-digicert merged commit c571e5e into master May 28, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants