Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Submitted
Workspace IBM i
Categories PTF and Service
Created by Guest
Created on Apr 16, 2024

Addition of Critical Security Patch Comparison Features via SQL Query

Currently, managing critical security patches is a major priority for IT teams to ensure the security of systems and sensitive data. 
However, the task of comparing applied security patches with known vulnerabilities listed in the CVE database can be tedious and prone to human errors.

Idea priority High
  • Guest
    Reply
    |
    Apr 16, 2024

    Proposal:

    I propose adding a feature in IBM products to facilitate the comparison of applied critical security patches with known vulnerabilities listed in the CVE database, using SQL queries. This feature would allow users to better identify CVEs for which critical security patches are missing on their systems, thereby facilitating proactive vulnerability management and strengthening the overall security posture of their infrastructures.

    Benefits:

    Enhanced Security: By quickly identifying missing critical security patches, IT teams can proactively respond to potential vulnerabilities and enhance system security.
    Time Savings: The automated comparison feature of security patches with CVEs will reduce the time and effort required to perform this task manually.
    Risk Reduction: By minimizing the time between vulnerability discovery and application of the corresponding patch, organizations can reduce the risks of exploitation by attackers.
    Suggested Implementation:

    Integration of a feature in IBM products that allows users to create and execute SQL queries to compare applied security patches with vulnerabilities listed in the CVE database.
    User-Friendly Interface: Design an intuitive user interface to facilitate the creation, execution, and analysis of SQL query results.
    Documentation and Support: Provide detailed documentation as well as technical support to assist users in fully leveraging this feature.
    Conclusion:

    By adding this feature, IBM would demonstrate its commitment to the security of its customers and provide them with a powerful tool to strengthen the protection of their systems against cyber threats. This proposal aims to improve the operational efficiency of IT teams while reducing the risks associated with security vulnerabilities.

    Like that

     

    -- Equivalents du GO PTFMNU de QMGTOOLS en SQL
    -- Basé sur un exemple de Scott Forstie : https://gist.github.com/forstie/cfe2636bf9b13d175b3c830aa1527165
    -- Avec les fonctions HTTP de QSYS2 (technologie AXIS, où l'on peut passer un proxy en tant que paramètre)
    -- La documentation :
    -- https://www.ibm.com/docs/en/i/7.4?topic=functions-http-get-http-get-blob
    -- Exemple dans les options : {"sslTolerate":"true" , "proxy" : "host,port", "proxyAuth" : "userid,password" , "proxySsl" : "false"}
    -- Ex W/o  Proxy (  select qsys2.HTTP_GET(hiper_PTF_URL, '{"sslTolerate":"true"}')
    -- EX With Proxy (  select qsys2.HTTP_GET(hiper_PTF_URL, '{"sslTolerate":"true","proxy":"172.23.191.28,80"}') 
    -- A noter qu'il faur que le certificat store /QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KDB existe et soit accessible (*RX) sur tout le chemin.
    -- CHGAUT OBJ('/qibm/UserData/ICSS/Cert/Server/DEFAULT.KDB') USER(*PUBLIC) DTAAUT(*RX) OBJAUT(*SAME) SUBTREE(*ALL) SYMLNK(*NO)
    -- S'il n'existe pas l'on reçoit le message GSKit Error is 202 - Key database file was not found. Pour la création, voir le lien suivant :
    -- https://www.ibm.com/docs/en/i/7.5?topic=dcm-setting-up-certificates-first-time
    -- Ne pas copier stop;

    -- Compare PTF group, équivalent PTFMNU option 1 : ( Test OK en V7R5M0)
    SELECT
          CASE
              WHEN ACTUAL.GRPPTF IS NULL THEN 'PTF GROUP DOES NOT EXIST ON ' CONCAT CURRENT SERVER
              WHEN PSPS.PSP_NUMBER IS NULL THEN 'PSP INFORMATION NOT AVAILABLE'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL = PSPS.PSP_LEVEL
                  AND ACTUAL.PTF_GROUP_STATUS = 'INSTALLED' THEN 'INSTALLED LEVEL IS CURRENT'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL = PSPS.PSP_LEVEL
                  AND ACTUAL.PTF_GROUP_STATUS = 'APPLY AT NEXT IPL' THEN 'CURRENT AT THE NEXT IPL'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL < PSPS.PSP_LEVEL THEN 'UPDATE AVAILABLE'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL > PSPS.PSP_LEVEL THEN 'PSP IS DOWNLEVEL -  ' CONCAT ACTUAL.PTF_GROUP_STATUS
          END PTF_GROUP_CURRENCY,
          COALESCE(PSPS.PSP_NUMBER, ACTUAL.GRPPTF) PTF_GROUP_ID,
          COALESCE(PSPS.PSP_TITLE, ACTUAL.PTF_GROUP_DESCRIPTION) PTF_GROUP_TITLE,
          ACTUAL.PTF_GROUP_LEVEL PTF_GROUP_LEVEL_INSTALLED,
          PSPS.PSP_LEVEL PTF_GROUP_LEVEL_AVAILABLE,
          DATE(TIMESTAMP_FORMAT(PSPS.PSP_DATE, 'MMDDYYYY')) AS LAST_UPDATED_BY_IBM,
          COALESCE(PSPS.PSP_RELEASE, ACTUAL.PTF_GROUP_TARGET_RELEASE) PTF_GROUP_RELEASE,
          ACTUAL.PTF_GROUP_STATUS PTF_GROUP_STATUS_ON_SYSTEM,
          PSPS.PSP_DATE AS PTF_GROUP_LAST_UPDATED_BY_IBM
       FROM XMLTABLE('/all_psps/psp' PASSING XMLPARSE(DOCUMENT QSYS2.HTTP_GET_BLOB(
                'https://www.ibm.com/support/pages/sites/default/files/inline-files/xmldoc.xml', '{"sslTolerate":"true"}')) COLUMNS
            PSP_RELEASE CHAR(5) PATH 'release', PSP_NUMBER CHAR(7) PATH 'number', PSP_TITLE VARCHAR(1000) PATH 'title', PSP_LEVEL
            INTEGER PATH 'level', PSP_DATE CHAR(10) PATH 'date') PSPS
            RIGHT OUTER JOIN (
                    SELECT SUBSTR(PTF_GROUP_NAME, 1, 7) AS GRPPTF,
                           PTF_GROUP_LEVEL,
                           PTF_GROUP_STATUS,
                           PTF_GROUP_DESCRIPTION,
                           PTF_GROUP_TARGET_RELEASE
                        FROM (
                                SELECT PTF_GROUP_NAME,
                                       PTF_GROUP_LEVEL,
                                       PTF_GROUP_STATUS,
                                       PTF_GROUP_DESCRIPTION,
                                       PTF_GROUP_TARGET_RELEASE,
                                       RANK() OVER (
                                           PARTITION BY PTF_GROUP_NAME
                                           ORDER BY PTF_GROUP_LEVEL DESC
                                       ) AS INSTALLED_NUMBER
                                    FROM QSYS2.GROUP_PTF_INFO
                            ) A
                        WHERE A.INSTALLED_NUMBER = 1
                ) ACTUAL
                ON (ACTUAL.GRPPTF = PSPS.PSP_NUMBER); 
                  
    -- La syntaxe SQL équivalente à l'option 2 du PTFMNU pour avoir la liste des ptfs hiper non installée :
    with iLevel (hiper_PTF_URL) as (  select 'https://public.dhe.ibm.com/services/us/igsc/has/R' concat OS_VERSION concat
              OS_RELEASE concat '0HIPER.txt'  from sysibmadm.env_sys_info     ),
        raw_webpage (webpage_text) as (  select qsys2.HTTP_GET(hiper_PTF_URL, '{"sslTolerate":"true"}')
            from iLevel    ),   def_ptfs (agg_list) as (  select  cast(  substring(webpage_text, posstr(webpage_text, '-------') , 30000) as varchar(30000)
              ccsid 37) as URL_STRING   from raw_webpage  ), hiper_ptfs(partition, host, serial_no, OS_level, HIPERPTF, APARPTF, COMPIDPTF) as (
          select PARTITION_NAME, b.host_name, serial_number,  cast('V' concat OS_VERSION concat 'R' concat OS_RELEASE as varchar(10)),
            char(substring(element, 1, 7), 7),   char(substring(element, 10, 7), 7),
            char(substring(element, 19, 7), 7)       from qsys2.system_status_info_basic a, sysibmadm.env_sys_info b, def_ptfs, table (
              SYSTOOLS.split(agg_list, x'25')         ) where length(rtrim(element)) > 0) select * from hiper_ptfs   where
        -- The corrective PTF is not applied 
        HIPERPTF not in (select PTF_IDENTIFIER from qsys2.ptf_info where PTF_PRODUCT_ID = LICPGM and 
                          (PTF_LOADED_STATUS like '%APPLIED%' or PTF_LOADED_STATUS like '%SUPERSEDE%'))
          and COMPIDPTF in (SELECT PRODUCT_ID   FROM QSYS2.SOFTWARE_PRODUCT_INFO )  ;             
    stop;

    -- Defectives PTF non présentes sur cet IBM i, équivalent PTFMNU option 3 :
    with iLevel (defective_PTF_URL) as (  select 'https://public.dhe.ibm.com/services/us/igsc/has/R' concat OS_VERSION concat OS_RELEASE concat '0DEFECT.txt'
       from sysibmadm.env_sys_info ) , raw_webpage (webpage_text) as ( select qsys2.HTTP_GET(defective_PTF_URL, '{"sslTolerate":"true"}')
       from iLevel  ),  def_ptfs (agg_list) as (  select  cast(  substring(webpage_text, posstr(webpage_text, '----------') + 11, 30000) as varchar(30000)
       ccsid 37) as URL_STRING  from raw_webpage   ),  defective_ptfs(partition, host, serial_no, OS_level, Bad_PTF, APAR, LICPGM, Fixing_PTF) as (
       select PARTITION_NAME, b.host_name, serial_number,  'V' concat OS_VERSION concat 'R' concat OS_RELEASE,  char(substring(element, 1, 7), 7), 
       char(substring(element, 10, 7), 7),  char(substring(element, 19, 7), 7),  case when length(rtrim(substring(char(element,100), 28, 7))) > 0 
       then rtrim(char(substring(char(element,100), 28, 7))) else 'UNKNOWN' end as Fixing_PTF from qsys2.system_status_info_basic a, sysibmadm.env_sys_info b, def_ptfs, table (
       SYSTOOLS.split(agg_list, x'25')  ) where length(rtrim(element)) > 0) select * from defective_ptfs   where 
        -- The Bad PTF is on in any form
        bad_PTF in (select PTF_IDENTIFIER from qsys2.ptf_info where PTF_PRODUCT_ID = LICPGM)  and
        -- The corrective PTF is not applied 
        Fixing_PTF not in (select PTF_IDENTIFIER from qsys2.ptf_info where PTF_PRODUCT_ID = LICPGM and 
                          (PTF_LOADED_STATUS like '%APPLIED%' or PTF_LOADED_STATUS like '%SUPERSEDE%'));
    stop;

    -- tmpstg PTF non présente sur cet IBM i, équivalent PTFMNU option 8
    with iLevel (defective_PTF_URL) as ( select 'https://public.dhe.ibm.com/services/us/igsc/has/R' concat OS_VERSION concat
              OS_RELEASE concat '0TMPPTF.txt'  from sysibmadm.env_sys_info  ),  raw_webpage (webpage_text) as (
          select qsys2.HTTP_GET(defective_PTF_URL, '{"sslTolerate":"true"}')  from iLevel ),   def_ptfs (agg_list) as (   select
            cast( substring(webpage_text, posstr(webpage_text, '-------') , 30000) as varchar(30000)  ccsid 37) as URL_STRING
            from raw_webpage  ),   tmpstg_ptfs(partition, host, serial_no, OS_level, TMPPTF) as (  select PARTITION_NAME, b.host_name, serial_number,
            cast('V' concat OS_VERSION concat 'R' concat OS_RELEASE as varchar(10)),   char(substring(element, 1, 7), 7)
          from qsys2.system_status_info_basic a, sysibmadm.env_sys_info b, def_ptfs, table (  SYSTOOLS.split(agg_list, x'25')
            ) where length(rtrim(element)) > 0) select * from tmpstg_ptfs   where
        -- The corrective PTF is not applied 
        TMPPTF not in (select PTF_IDENTIFIER from qsys2.ptf_info where PTF_PRODUCT_ID = LICPGM and 
                          (PTF_LOADED_STATUS like '%APPLIED%' or PTF_LOADED_STATUS like '%SUPERSEDE%'));
    stop;

    ======================================================================================================================================================================================
    Erreur en V7R3M0    Debut
    SELECT
          CASE
              WHEN ACTUAL.GRPPTF IS NULL THEN 'PTF GROUP DOES NOT EXIST ON ' CONCAT CURRENT SERVER
              WHEN PSPS.PSP_NUMBER IS NULL THEN 'PSP INFORMATION NOT AVAILABLE'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL = PSPS.PSP_LEVEL
                  AND ACTUAL.PTF_GROUP_STATUS = 'INSTALLED' THEN 'INSTALLED LEVEL IS CURRENT'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL = PSPS.PSP_LEVEL
                  AND ACTUAL.PTF_GROUP_STATUS = 'APPLY AT NEXT IPL' THEN 'CURRENT AT THE NEXT IPL'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL < PSPS.PSP_LEVEL THEN 'UPDATE AVAILABLE'
              WHEN ACTUAL.GRPPTF = PSPS.PSP_NUMBER
                  AND ACTUAL.PTF_GROUP_LEVEL > PSPS.PSP_LEVEL THEN 'PSP IS DOWNLEVEL -  ' CONCAT ACTUAL.PTF_GROUP_STATUS
          END PTF_GROUP_CURRENCY,
          COALESCE(PSPS.PSP_NUMBER, ACTUAL.GRPPTF) PTF_GROUP_ID,
          COALESCE(PSPS.PSP_TITLE, ACTUAL.PTF_GROUP_DESCRIPTION) PTF_GROUP_TITLE,
          ACTUAL.PTF_GROUP_LEVEL PTF_GROUP_LEVEL_INSTALLED,
          PSPS.PSP_LEVEL PTF_GROUP_LEVEL_AVAILABLE,
          DATE(TIMESTAMP_FORMAT(PSPS.PSP_DATE, 'MMDDYYYY')) AS LAST_UPDATED_BY_IBM,
          COALESCE(PSPS.PSP_RELEASE, ACTUAL.PTF_GROUP_TARGET_RELEASE) PTF_GROUP_RELEASE,
          ACTUAL.PTF_GROUP_STATUS PTF_GROUP_STATUS_ON_SYSTEM,
          PSPS.PSP_DATE AS PTF_GROUP_LAST_UPDATED_BY_IBM
       FROM XMLTABLE('/all_psps/psp' PASSING XMLPARSE(DOCUMENT QSYS2.HTTP_GET_BLOB(
                'https://www.ibm.com/support/pages/sites/default/files/inline-files/xmldoc.xml', '{"sslTolerate":"true"}')) COLUMNS
            PSP_RELEASE CHAR(5) PATH 'release', PSP_NUMBER CHAR(7) PATH 'number', PSP_TITLE VARCHAR(1000) PATH 'title', PSP_LEVEL
            INTEGER PATH 'level', PSP_DATE CHAR(10) PATH 'date') PSPS
            RIGHT OUTER JOIN (
                    SELECT SUBSTR(PTF_GROUP_NAME, 1, 7) AS GRPPTF,
                           PTF_GROUP_LEVEL,
                           PTF_GROUP_STATUS,
                           PTF_GROUP_DESCRIPTION,
                           PTF_GROUP_TARGET_RELEASE
                        FROM (
                                SELECT PTF_GROUP_NAME,
                                       PTF_GROUP_LEVEL,
                                       PTF_GROUP_STATUS,
                                       PTF_GROUP_DESCRIPTION,
                                       PTF_GROUP_TARGET_RELEASE,
                                       RANK() OVER (
                                           PARTITION BY PTF_GROUP_NAME
                                           ORDER BY PTF_GROUP_LEVEL DESC
                                       ) AS INSTALLED_NUMBER
                                    FROM QSYS2.GROUP_PTF_INFO
                            ) A
                        WHERE A.INSTALLED_NUMBER = 1
                ) ACTUAL
                ON (ACTUAL.GRPPTF = PSPS.PSP_NUMBER); 
                
       Fin
    ======================================================================================================================================================================================