Code Monkey home page Code Monkey logo

Comments (7)

somoking avatar somoking commented on May 15, 2024

Hey Aydeisen, I was able to do this pretty simply.

The code below is in c# with newton Json. This means the object JArray is a json array and JObject is a json object.

 static Dictionary<string,string> ProductMapper (JArray ProductTree)
        {
            Dictionary<string, string> ProductIDDict = new Dictionary<string, string>();
            foreach (JObject Product in ProductTree)
            {
                ProductIDDict.Add((string)Product["ProductID"], (string)Product["Value"]);
            }
            return ProductIDDict;
        }

I do not think this ability currently exists or can be added to the project so you will probably have to do it on your own program.

from msrc-microsoft-security-updates-api.

aydeisen avatar aydeisen commented on May 15, 2024

Thanks, I found what I was looking for. The Product ID translation was further up the schema for the CVRF link than I was originally looking

from msrc-microsoft-security-updates-api.

ryvius avatar ryvius commented on May 15, 2024

Hi where is this product id translation?

from msrc-microsoft-security-updates-api.

craig-martin avatar craig-martin commented on May 15, 2024

That mapping in CVRF is in the ProductTree node. You can access it like this:


# Get a CVRF document
$cvrf = Get-MsrcCvrfDocument -ID '2018-Jan'

# Get CVRF.ProductTree.FullProductName
$cvrf.ProductTree.FullProductName
<#
ProductID   Value                                                                                                                                 
---------   -----                                                                                                                                 
11463       .NET Core 1.0                                                                                                                         
11464       .NET Core 1.1                                                                                                                         
11465       .NET Core 2.0                                                                                                                         

11460       ASP.NET Core 2.0                                                                                                                      
11447       ChakraCore                                                                                                                            
10555-10378 Internet Explorer 10 on Windows Server 2012                                                                                           
10486-10729 Internet Explorer 11 on Windows 10 for 32-bit Systems                                                                                 
10486-10735 Internet Explorer 11 on Windows 10 for x64-based Systems                                                                                                                                             
10486-10047 Internet Explorer 11 on Windows 7 for 32-bit Systems Service Pack 1                                                                   
10486-10048 Internet Explorer 11 on Windows 7 for x64-based Systems Service Pack 1                                                                
10486-10481 Internet Explorer 11 on Windows 8.1 for 32-bit systems                                                                                
10486-10482 Internet Explorer 11 on Windows 8.1 for x64-based systems                                                                             
10486-10484 Internet Explorer 11 on Windows RT 8.1                                                                                                
10486-10051 Internet Explorer 11 on Windows Server 2008 R2 for x64-based Systems Service Pack 1                                                   
10486-10483 Internet Explorer 11 on Windows Server 2012 R2                                                                                        
10486-10816 Internet Explorer 11 on Windows Server 2016                                                                                           
10336-9312  Internet Explorer 9 on Windows Server 2008 for 32-bit Systems Service Pack 2                                                          
10336-9318  Internet Explorer 9 on Windows Server 2008 for x64-based Systems Service Pack 2                                                       
9292-9312   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2                                  
9292-9311   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2                           
9292-9318   Microsoft .NET Framework 2.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2                               
9195-9312   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for 32-bit Systems Service Pack 2                                  
9195-9311   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for Itanium-Based Systems Service Pack 2                           
9195-9318   Microsoft .NET Framework 3.0 Service Pack 2 on Windows Server 2008 for x64-based Systems Service Pack 2                               
2472-10729  Microsoft .NET Framework 3.5 on Windows 10 for 32-bit Systems                                                                         
2472-10735  Microsoft .NET Framework 3.5 on Windows 10 for x64-based Systems                                                                      
2472-10789  Microsoft .NET Framework 3.5 on Windows 10 Version 1511 for 32-bit Systems                                                                      
#>

from msrc-microsoft-security-updates-api.

ryvius avatar ryvius commented on May 15, 2024

@craig-martin thank u! is there any table for product family?

from msrc-microsoft-security-updates-api.

craig-martin avatar craig-martin commented on May 15, 2024

The product family detail is in the ProductTree node of the CVRF document. CVRF is quite normalized but can be aggregated back into tables depending on what you're trying to do.

Get-MsrcCvrfAffectedSoftware.ps1 is an example of this.

from msrc-microsoft-security-updates-api.

tma-prismo avatar tma-prismo commented on May 15, 2024

@craig-martin from the product id and the product name, how do we map to the information we get from the machine,
for example, for product "SQL Server Manage Studio", the api has:
{
"ProductID": "11784",
"Value": "SQL Server Management Studio 18.6"
},

"wmic get product name, version, identifyingnumber" return
{67FD1BCA-F06F-48F5-86E9-AC4EA982A775} SQL Server Management Studio 15.0.18338.0

the base product name matches, but the api seems to have product id and "external" version number, and the wmic has a build number, GUID, how do we map between these?

in this case the release note has the info, but is there a general method to do the mapping?
https://docs.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-ver15

from msrc-microsoft-security-updates-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.