Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulnerability fix for AzureWebAppContainerV1 #16595

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import tl = require('azure-pipelines-task-lib');
import { AzureRmWebAppDeploymentProvider } from '../azurermwebappdeploymentprovider';
import { TaskParametersUtility, TaskParameters } from '../taskparameters';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/mock_utils';
import { getMockEndpoint } from '../node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/mock_utils';
import { mockAzureARMPreDeploymentSteps, mockContainerDeploySettings } from "./mock_utils";

getMockEndpoint();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class AzureRmWebAppDeploymentProviderTests {
setEndpointData();
setAgentsData();

tr.registerMock('azure-pipelines-tasks-azurermdeploycommon/operations/KuduServiceUtility', {
tr.registerMock('azure-pipelines-tasks-azurermdeploycommon-v3/operations/KuduServiceUtility', {
KuduServiceUtility: function(A) {
return {
updateDeploymentStatus : function(B,C,D) {
Expand Down
12 changes: 6 additions & 6 deletions Tasks/AzureWebAppContainerV1/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import tl = require('azure-pipelines-task-lib');
var ltx = require('ltx');
import fs = require('fs');

var AppServiceTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/L0-azure-arm-app-service.js");
var KuduServiceTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/L0-azure-arm-app-service-kudu-tests.js");
var ApplicationInsightsTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/L0-azure-arm-appinsights-tests.js");
var ResourcesTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/L0-azure-arm-resource-tests.js");
var AppServiceTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/L0-azure-arm-app-service.js");
var KuduServiceTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/L0-azure-arm-app-service-kudu-tests.js");
var ApplicationInsightsTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/L0-azure-arm-appinsights-tests.js");
var ResourcesTests = require("../node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/L0-azure-arm-resource-tests.js");

describe('AzureWebAppDeployment Suite', function() {

this.timeout(60000);

before((done) => {
if(!tl.exist(path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests/node_modules'))) {
tl.cp(path.join( __dirname, 'node_modules'), path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azurermdeploycommon/Tests'), '-rf', true);
if(!tl.exist(path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests/node_modules'))) {
tl.cp(path.join( __dirname, 'node_modules'), path.join(__dirname, '..', 'node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/Tests'), '-rf', true);
}

done();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path = require('path');
import * as ParameterParserUtility from 'azure-pipelines-tasks-azurermdeploycommon/operations/ParameterParserUtility';
import * as ParameterParserUtility from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/ParameterParserUtility';

function validateParameterParserUtility() {
var paramString = "-port 8080 -Release.ReleaseName Release-1173";
Expand Down
25 changes: 13 additions & 12 deletions Tasks/AzureWebAppContainerV1/Tests/package-lock.json

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

4 changes: 2 additions & 2 deletions Tasks/AzureWebAppContainerV1/azurermwebappdeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import tl = require('azure-pipelines-task-lib/task');
import path = require('path');
import { TaskParameters, TaskParametersUtility } from './taskparameters';
import { AzureRmWebAppDeploymentProvider } from './azurermwebappdeploymentprovider';
import * as Endpoint from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-endpoint';
import * as Endpoint from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-endpoint';

async function main() {
let isDeploymentSuccess: boolean = true;

try {
tl.setResourcePath(path.join( __dirname, 'task.json'));
tl.setResourcePath(path.join( __dirname, 'node_modules/azure-pipelines-tasks-azurermdeploycommon/module.json'));
tl.setResourcePath(path.join( __dirname, 'node_modules/azure-pipelines-tasks-azurermdeploycommon-v3/module.json'));
var taskParams: TaskParameters = await TaskParametersUtility.getParameters();
var deploymentProvider = new AzureRmWebAppDeploymentProvider(taskParams);

Expand Down
20 changes: 10 additions & 10 deletions Tasks/AzureWebAppContainerV1/azurermwebappdeploymentprovider.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { TaskParameters } from './taskparameters';
import { KuduServiceUtility } from 'azure-pipelines-tasks-azurermdeploycommon/operations/KuduServiceUtility';
import { AzureAppService } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-app-service';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-endpoint';
import { Kudu } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-app-service-kudu';
import { AzureAppServiceUtility } from 'azure-pipelines-tasks-azurermdeploycommon/operations/AzureAppServiceUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azureModels';
import { AzureResourceFilterUtility } from 'azure-pipelines-tasks-azurermdeploycommon/operations/AzureResourceFilterUtility';
import { KuduServiceUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/KuduServiceUtility';
import { AzureAppService } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-app-service';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-endpoint';
import { Kudu } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-app-service-kudu';
import { AzureAppServiceUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/AzureAppServiceUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azureModels';
import { AzureResourceFilterUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/AzureResourceFilterUtility';
import tl = require('azure-pipelines-task-lib/task');
import { addReleaseAnnotation } from 'azure-pipelines-tasks-azurermdeploycommon/operations/ReleaseAnnotationUtility';
import { ContainerBasedDeploymentUtility } from 'azure-pipelines-tasks-azurermdeploycommon/operations/ContainerBasedDeploymentUtility';
import * as ParameterParser from 'azure-pipelines-tasks-azurermdeploycommon/operations/ParameterParserUtility';
import { addReleaseAnnotation } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/ReleaseAnnotationUtility';
import { ContainerBasedDeploymentUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/ContainerBasedDeploymentUtility';
import * as ParameterParser from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/ParameterParserUtility';

export class AzureRmWebAppDeploymentProvider{
protected taskParams:TaskParameters;
Expand Down
102 changes: 50 additions & 52 deletions Tasks/AzureWebAppContainerV1/package-lock.json

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

4 changes: 2 additions & 2 deletions Tasks/AzureWebAppContainerV1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@types/node": "^10.17.0",
"@types/q": "1.0.7",
"@types/uuid": "^8.3.0",
"azure-pipelines-tasks-azurermdeploycommon": "^2.1.0",
"moment": "2.21.0",
"azure-pipelines-tasks-azurermdeploycommon-v3": "^3.207.0",
"moment": "^2.29.4",
"q": "1.4.1",
"xml2js": "0.4.13"
},
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureWebAppContainerV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 198,
"Minor": 208,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureWebAppContainerV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 198,
"Minor": 208,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
Expand Down
10 changes: 5 additions & 5 deletions Tasks/AzureWebAppContainerV1/taskparameters.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import tl = require('azure-pipelines-task-lib/task');
import { AzureResourceFilterUtility } from 'azure-pipelines-tasks-azurermdeploycommon/operations/AzureResourceFilterUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azureModels';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-endpoint';
import { AzureAppService } from 'azure-pipelines-tasks-azurermdeploycommon/azure-arm-rest/azure-arm-app-service';
import { PackageUtility } from 'azure-pipelines-tasks-azurermdeploycommon/webdeployment-common/packageUtility';
import { AzureResourceFilterUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/operations/AzureResourceFilterUtility';
import { AzureEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azureModels';
import { AzureRMEndpoint } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-endpoint';
import { AzureAppService } from 'azure-pipelines-tasks-azurermdeploycommon-v3/azure-arm-rest/azure-arm-app-service';
import { PackageUtility } from 'azure-pipelines-tasks-azurermdeploycommon-v3/webdeployment-common/packageUtility';
import fs = require('fs');

const osTypeMap = new Map([
Expand Down