Skip to content

Commit

Permalink
Upgrade project, prepare GitHub flow (#279)
Browse files Browse the repository at this point in the history
* Upgrade project, prepare GitHub flow

Upgrades the project to work with supported versions, and prepares pipelines to work with a GitHub flow i.e., only main (will rename from master). Also fixes #273

* Microsoft mandatory file (#274)

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>

* Update .vsconfig

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4524772 commit 3dc7847
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 28 deletions.
6 changes: 2 additions & 4 deletions .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.TextTemplating",
"Microsoft.VisualStudio.Component.VC.CoreIde",
Expand All @@ -14,10 +12,10 @@
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.VC.v141.x86.x64",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Component.Git",
"Microsoft.VisualStudio.Component.WinXP"
]
}
}
6 changes: 4 additions & 2 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ trigger:
batch: true
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
tags:
include:
- "*"

pr: none

Expand Down
13 changes: 6 additions & 7 deletions .vsts-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ trigger:
batch: true
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
Expand Down Expand Up @@ -35,11 +34,11 @@ steps:
sourceScanPath: $(Build.SourcesDirectory)

- task: securedevelopmentteam.vss-secure-development-tools.build-task-prefast.SDLNativeRules@2
displayName: 'Run the PREfast SDL Native Rules for MSBuild'
displayName: Run the PREfast SDL Native Rules for MSBuild
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
displayName: 'Run PoliCheck'
displayName: Run PoliCheck
inputs:
targetType: F
targetArgument: '$(Build.SourcesDirectory)'
Expand All @@ -49,7 +48,7 @@ steps:
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
displayName: 'Run BinSkim'
displayName: Run BinSkim
inputs:
InputType: Basic
Function: analyze
Expand All @@ -60,13 +59,13 @@ steps:
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Run CredScan'
displayName: Run CredScan
inputs:
debugMode: false

# Publish compliance results
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
displayName: Publish Security Analysis Logs

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: Check SDL results
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This project uses the following software. Newer versions may work but backward c

## Coding

This project uses a Git flow model releasing from the `master` branch with development based on and stabilize in the `develop` branch. You can view current build status in the [README](README.md) document.
This project uses a GitHub flow model with development and releases based on the `main` branch. You can view current build status in the [README](README.md) document.

Please follow project code styles including,

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Visual Studio Locator
=====================

![build status: master](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=master&label=master)
![build status: develop](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=develop&label=develop)
![build status: main](https://devdiv.visualstudio.com/DevDiv/_apis/build/status/Setup/Setup-vswhere-CI?branchName=main&label=main)
[![github release](https://img.shields.io/github/release/Microsoft/vswhere.svg?logo=github&logoColor=white)](https://github.com/Microsoft/vswhere/releases/latest)
[![github releases: all](https://img.shields.io/github/downloads/Microsoft/vswhere/total.svg?logo=github&logoColor=white&label=github)](https://github.com/Microsoft/vswhere/releases)
[![nuget: all](https://img.shields.io/nuget/dt/vswhere.svg?logo=nuget&logoColor=white&label=nuget)](https://nuget.org/packages/vswhere)
Expand Down
41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.8 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
3 changes: 1 addition & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ trigger: none
pr:
branches:
include:
- master
- develop
- main
paths:
exclude:
- README.md
Expand Down
4 changes: 0 additions & 4 deletions src/vswhere.lib/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@

#define WIN32_LEAN_AND_MEAN

#ifndef MAXUINT
#define MAXUINT 0xffff
#endif

// Windows headers
#include <windows.h>
#include <fcntl.h>
Expand Down
Binary file modified src/vswhere.lib/vswhere.lib.rc
Binary file not shown.
4 changes: 2 additions & 2 deletions src/vswhere.lib/vswhere.lib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<ProjectGuid>{4CCF39CB-4794-44E2-AA57-D215F13CF606}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswherelib</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
3 changes: 3 additions & 0 deletions src/vswhere/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ int wmain(_In_ int argc, _In_ LPCWSTR argv[])
}
catch (const system_error& ex)
{
// Make sure the console is initialized even for parsing errors.
console.Initialize();

const auto code = ex.code().value();
if (ERROR_INVALID_PARAMETER == code)
{
Expand Down
4 changes: 2 additions & 2 deletions src/vswhere/vswhere.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ProjectGuid>{210864F0-9A29-4479-B830-B802EE3F4D92}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswhere</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
4 changes: 2 additions & 2 deletions test/vswhere.test/vswhere.test.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<ProjectGuid>{76268871-D5A5-46BD-9805-41DB1C3072D1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vswheretest</RootNamespace>
<TargetUniversalCRTVersion>10.0.17763.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<TargetUniversalCRTVersion>10.0.19041.0</TargetUniversalCRTVersion>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<ProjectSubType>NativeUnitTestProject</ProjectSubType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down

0 comments on commit 3dc7847

Please sign in to comment.