* update main readme
* update security readme
* update shell for ps in code block samples
* updating codeblock types from shell to bash to see if syntax highligting is improved
This commit is contained in:
Ben Carpenter 2023-02-04 18:23:29 -08:00 коммит произвёл GitHub
Родитель ed480321b7
Коммит 69cdc1d1f5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 193 добавлений и 122 удалений

296
README.md
Просмотреть файл

@ -1,136 +1,214 @@
# Surface Dev Center Manager (SDCM)
# __Surface Dev Center Manager (SDCM)__
Surface Dev Center Manager is a tool that utilizes the REST APIs made available by Microsoft Hardware Dev Center to automate many common tasks for hardware development and maintenance around driver and firmware management.
Surface Dev Center Manager (SDCM) is a tool that utilizes the REST APIs made available by Microsoft Partner Center (a.k.a. Hardware Dev Center) to automate many common tasks for hardware development and maintenance around driver and firmware management.
SDCM enables you to create Attestation and WHQL products, submissions, download the resulting signed packages and manage shipping labels to release software on Windows Update.
**SDCM** enables you to create `Attestation` and `WHQL` products, submissions, download the resulting signed packages, and manage shipping labels to release software on Windows Update.
This tool is based on the
[Hardware Dev Center API](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api) and detailed options are available with the -?, -h or -help option at the command line.
> This tool is based on the
[Hardware Dashboard API](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api). Detailed options are available with the `-?`, `-h` or `-help` option at the command line.
<br/>
# Getting Started
- Clone the repo
- Follow the steps here to [setup your app](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api#associate-an-azure-ad-application-with-your-windows-dev-center-account) to get credentials
- Edit authconfig.json to the appropriate values after your app was set up
1. Clone the repo
1. Follow the steps here to [setup your app](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api#associate-an-azure-ad-application-with-your-windows-dev-center-account) to get credentials
1. Edit authconfig.json to the appropriate values after your app was set up
- Change clientId, tenantId and key to match the values from your app registration
- You should not have to change the url or urlPrefix
- Build the project
1. Build the project
<br/>
# Input Json Formats
Please refer to the [Hardware Dev Center API](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api) for detailed information on each of the settings below. This sample is targeted for a RS4 HLK submission and shipping label.
> Please refer to the [Hardware Dashboard API](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api) documentation for detailed information on each of the settings below. This sample is targeted for a RS4 HLK submission and shipping label.
## Creating a Product
> {
> "createType": "product",
> "createProduct": {
> "productName": "ProductName_HLK",
> "testHarness": "HLK",
> "selectedProductTypes": { "windows_v100_RS4": "Unclassified" },
> "requestedSignatures": [ "WINDOWS_v100_X64_RS4_FULL" ],
> "announcementDate": "2018-10-02T00:00:00",
> "deviceType": "external",
> "deviceMetaDataIds": null,
> "firmwareVersion": "0",
> "isTestSign": false,
> "markettingNames": null,
> "additionalAttributes": null
> }
> }
```json
{
"createType": "product",
"createProduct": {
"productName": "ProductName_HLK",
"testHarness": "HLK",
"selectedProductTypes": { "windows_v100_RS4": "Unclassified" },
"requestedSignatures": [ "WINDOWS_v100_X64_RS4_FULL" ],
"announcementDate": "2023-01-01T00:00:00",
"deviceType": "external",
"deviceMetaDataIds": null,
"firmwareVersion": "0",
"isTestSign": false,
"markettingNames": null,
"additionalAttributes": null
}
}
```
For an Attestation submission, change testHarness to Attestation.
> For an Attestation submission, change testHarness to Attestation.
<br/>
## Creating a Submission
> {
> "createType": "submission",
> "createSubmission": {
> "name": "ProductName_HLK_Submission",
> "type": "initial"
> }
> }
```json
{
"createType": "submission",
"createSubmission": {
"name": "ProductName_HLK_Submission",
"type": "initial"
}
}
```
<br/>
## Creating a Shipping Label
> {
> "createType": "shippingLabel",
> "createShippingLabel": {
> "publishingSpecifications": {
> "goLiveDate": "2018-10-02T00:00:00.000Z",
> "visibleToAccounts": [],
> "isAutoInstallDuringOSUpgrade": true,
> "isAutoInstallOnApplicableSystems": true,
> "isDisclosureRestricted": true,
> "publishToWindows10s": false,
> "additionalInfoForMsApproval": {
> "microsoftContact": "contact@microsoft.com",
> "validationsPerformed": "TBD",
> "affectedOems": [
> "Your Company"
> ],
> "isRebootRequired": true,
> "isCoEngineered": true,
> "isForUnreleasedHardware": true,
> "hasUiSoftware": false,
> "businessJustification": "Driver Update"
> }
> },
> "targeting": {
> "hardwareIds": [
> {
> "bundleId": "0",
> "infId": "empty.inf",
> "operatingSystemCode": "WINDOWS_v100_RS4_FULL",
> "pnpString": "empty pnp"
> }
> ],
> "chids": [
> {
> "chid": "guid"
> }
> ]
> },
> "name": "ProductName_HLK_ShippingLabel",
> "destination": "windowsUpdate"
> }
> }
```json
{
"createType": "shippingLabel",
"createShippingLabel": {
"publishingSpecifications": {
"goLiveDate": "2023-01-01T00:00:00.000Z",
"visibleToAccounts": [],
"isAutoInstallDuringOSUpgrade": true,
"isAutoInstallOnApplicableSystems": true,
"isDisclosureRestricted": true,
"publishToWindows10s": false,
"additionalInfoForMsApproval": {
"microsoftContact": "contact@microsoft.com",
"validationsPerformed": "TBD",
"affectedOems": [
"Your Company"
],
"isRebootRequired": true,
"isCoEngineered": true,
"isForUnreleasedHardware": true,
"hasUiSoftware": false,
"businessJustification": "Driver Update"
}
},
"targeting": {
"hardwareIds": [
{
"bundleId": "0",
"infId": "empty.inf",
"operatingSystemCode": "WINDOWS_v100_RS4_FULL",
"pnpString": "empty pnp"
}
],
"chids": [
{
"chid": "guid"
}
]
},
"name": "ProductName_HLK_ShippingLabel",
"destination": "windowsUpdate"
}
}
```
Note that SDCM will auto-populate and publish all hardware IDs found in a Submission when creating a Shipping Label.
> Note that SDCM will auto-populate and publish all hardware IDs found in a Submission when creating a Shipping Label.
---
<br/>
# Basic Operations
## Create a Product
- Create a json file 'Create_ProductName_HLK.json' using the Product json example above
> sdcm.exe -create Create_ProductName_HLK.json
- This will output a Product ID (PID) if successful
Create a json file '`Create_ProductName_HLK.json`' using the Product json example above.
```bash
sdcm.exe -create Create_ProductName_HLK.json
```
> This will output a Product ID (PID) if successful
---
<br/>
## List the Product
- Verify the product was created by listing the details.
> sdcm.exe -list product -productid PID
Verify the product was created by listing the details.
```bash
sdcm.exe -list product -productid PID
```
---
<br/>
## Create a Submission
- Create a json file 'Create_ProductName_Submission_HLK.json' using the Submission json example above
> sdcm.exe -create Create_ProductName_Submission_HLK.json -productid PID
- This will output a Submission ID (SID) if successful
Create a json file '`Create_ProductName_Submission_HLK.json`' using the Submission json example above.
```bash
sdcm.exe -create Create_ProductName_Submission_HLK.json -productid PID
```
> This will output a Submission ID (SID) if successful
---
<br/>
## List the Submission
- List all the submissions for the product
> sdcm.exe -list submission -productid PID
- List a specific submission for the product
> sdcm.exe -list submission -productid PID -submissionid SID
List all the submissions for the product
```bash
sdcm.exe -list submission -productid PID
```
List a specific submission for the product
```bash
sdcm.exe -list submission -productid PID -submissionid SID
```
---
<br/>
## Upload a package to a Submission
- Make sure the package (.cab or .hlkx) is signed by the [Extended Validation Certificate (EV Cert)](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate) registered with your Hardware Dev Center Account
> sdcm.exe -upload test.hlkx -productid PID -submissionid SID
Make sure the package (`.cab` or `.hlkx`) is signed by the [Extended Validation Certificate (EV Cert)](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate) registered with your Partner Center *Hardware* Account
```bash
sdcm.exe -upload test.hlkx -productid PID -submissionid SID
```
---
<br/>
## Commit a Submission
- When everything is ready to start processing the submission, commit it
> sdcm.exe -commit -productid PID -submissionid SID
When everything is ready to start processing the submission, commit it
```bash
sdcm.exe -commit -productid PID -submissionid SID
```
---
<br/>
## Wait for a Submission to be Ready
> sdcm.exe -wait -productid PID -submissionid SID
```bash
sdcm.exe -wait -productid PID -submissionid SID
```
---
<br/>
## Download files from a Submission
> sdcm.exe -download hlksigned.zip -productid PID -submissionid SID
```bash
sdcm.exe -download hlksigned.zip -productid PID -submissionid SID
```
---
<br/>
# WHQL signing a Driver
See HLKx.ps1 in the Scripts folder
# Attestation signing a Driver
See Attestation.ps1 in the Scripts folder
# Creating a Shipping Label
See ShippingLabel.ps1 in the Scripts folder
> See `HLKx.ps1` in the Scripts folder.
---
<br/>
# Attestation signing a Driver
> See `Attestation.ps1` in the Scripts folder.
---
<br/>
# Creating a Shipping Label
> See `ShippingLabel.ps1` in the Scripts folder.
---
<br/>
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
@ -142,19 +220,3 @@ provided by the bot. You will only need to do this once across all repos using o
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Просмотреть файл

@ -1,12 +1,15 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
## Security
## __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
---
<br/>
## __Reporting Security Issues__
**Please do not report security vulnerabilities through public GitHub issues.**
@ -14,7 +17,7 @@ Instead, please report them to the Microsoft Security Response Center (MSRC) at
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). 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).
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:
@ -30,11 +33,17 @@ 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
---
<br/>
## __Preferred Languages__
We prefer all communications to be in English.
## Policy
---
<br/>
## __Policy__
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).