<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue | &amp;quot;Nist NVD&amp;quot; Integration is not working in Integration Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446126#M100</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;MOzfidan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the help.&lt;BR /&gt;I added the code to the integration but I still get the error:&lt;BR /&gt;"{"message": "Both modStartDate and modEndDate are required when either is present."}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Elad&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 08 Nov 2021 10:40:30 GMT</pubDate>
    <dc:creator>Elad1Goldenberg</dc:creator>
    <dc:date>2021-11-08T10:40:30Z</dc:date>
    <item>
      <title>Issue | "Nist NVD" Integration is not working</title>
      <link>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446012#M98</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have an issue with "Nist NVD" integration.&lt;BR /&gt;When I click the command "!Nvd-search-keyword" we are getting the following message:&lt;/P&gt;&lt;P&gt;"{" message ":" Both modStartDate and modEndDate are required when either is present. "}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The integration was published by: "Murat Ozfidan" and supported by "Community".&lt;/P&gt;&lt;P&gt;Does anyone have an issue and can help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Elad&lt;/P&gt;</description>
      <pubDate>Sun, 07 Nov 2021 11:12:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446012#M98</guid>
      <dc:creator>Elad1Goldenberg</dc:creator>
      <dc:date>2021-11-07T11:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issue | "Nist NVD" Integration is not working</title>
      <link>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446029#M99</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I found the cause of this error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NVD has implemented&amp;nbsp;&lt;STRONG&gt;API_Key&lt;/STRONG&gt;. Until I upgrade integration you have to follow the limits or you can copy integration and change code, add api_key value to connection method.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def connection(url, additional_parameters):

    headers = {'Accept': 'application/json'}
    #add "+ '&amp;amp;apiKey=' + YOUR_API_KEY" following row
    endpoint = url + additional_parameters + '&amp;amp;apiKey=' + YOUR_API_KEY
    req = requests.get(endpoint, headers=headers, verify=VERIFY_SSL)
    if req.status_code != 200:
        return_results(req.content)
        sys.exit(1)
    else:
        return req.json()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;source:&amp;nbsp;&lt;/SPAN&gt;&lt;A title="NVD News" href="https://nvd.nist.gov/general/news/API-Key-Announcement" target="_blank" rel="noopener nofollow noreferrer"&gt;https://nvd.nist.gov/general/news/API-Key-Announcement&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best practices for using the NVD API:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The best practice for making requests within either rate limit is to use the modified date parameters. No more than once every two hours, automated requests should include a range where modStartDate equals the time of the last response received and modEndDate equals the current time. Enterprise scale development should enforce this approach through a single requestor to ensure all users are in sync and have the latest CVE and CPE information. It is also recommended that users "sleep" their scripts for six seconds between requests.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Nov 2021 13:58:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446029#M99</guid>
      <dc:creator>MOzfidan</dc:creator>
      <dc:date>2021-11-07T13:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue | "Nist NVD" Integration is not working</title>
      <link>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446126#M100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;MOzfidan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the help.&lt;BR /&gt;I added the code to the integration but I still get the error:&lt;BR /&gt;"{"message": "Both modStartDate and modEndDate are required when either is present."}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Elad&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Nov 2021 10:40:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446126#M100</guid>
      <dc:creator>Elad1Goldenberg</dc:creator>
      <dc:date>2021-11-08T10:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue | "Nist NVD" Integration is not working</title>
      <link>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446953#M105</link>
      <description>&lt;P&gt;Hi Elad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I resolved this issue.&lt;/P&gt;&lt;P&gt;I made a few changes in keyword_search function.&lt;/P&gt;&lt;P&gt;Finally, The yaml file is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def keywordSearch():

    base_url = urljoin(demisto.params()['url'], '/rest/json/cves/1.0')
    keyword = demisto.args().get('keyword')
    isExactMatch = demisto.args().get('isExactMatch')
    time = int(demisto.args().get('time'))
    last_time = datetime.today() - timedelta(hours=int(time))
    start_date = last_time.strftime('%Y-%m-%dT%H:%M:%S:000')
    modEndDate_date =   datetime.today()
    modEndDate= modEndDate_date.strftime('%Y-%m-%dT%H:%M:%S:000')
    startIndex = demisto.args().get('startIndex')
    resultsPerPage = demisto.args().get('resultsPerPage')
    additional_parameters = '?modStartDate=' + start_date + ' UTC-00:00' + '&amp;amp;modEndDate=' + modEndDate + ' UTC-00:00' + '&amp;amp;keyword=' + keyword + \
        '&amp;amp;isExactMatch=' + isExactMatch + '&amp;amp;startIndex=' + str(startIndex) + '&amp;amp;resultsPerPage=' + str(resultsPerPage)
    generalSearchRequest = connection(base_url, additional_parameters)
    generalVulnerabilityList = extractVulnDetails(generalSearchRequest)

    headers = ['CVE ID', 'Description', 'Published Date', 'Last Modified Date', 'References']
    markdown = 'Keyword Search\n'
    markdown += tableToMarkdown('Vulnerabilities', generalVulnerabilityList, headers=headers, removeNull=True)

    results = CommandResults(
        readable_output=markdown,
        outputs_prefix='NistNVD.KeywordSearch',
        outputs_key_field='CVE ID',
        outputs=generalVulnerabilityList
    )

    return_results(results)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MOzfidan_0-1636628352314.png" style="width: 793px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/37580iF715F9E78AE40052/image-dimensions/793x232/is-moderation-mode/true?v=v2" width="793" height="232" role="button" title="MOzfidan_0-1636628352314.png" alt="MOzfidan_0-1636628352314.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MOzfidan_1-1636628398270.png" style="width: 866px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/37581iBE0BED58D585C61F/image-dimensions/866x652/is-moderation-mode/true?v=v2" width="866" height="652" role="button" title="MOzfidan_1-1636628398270.png" alt="MOzfidan_1-1636628398270.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 11:06:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/integration-discussions/issue-quot-nist-nvd-quot-integration-is-not-working/m-p/446953#M105</guid>
      <dc:creator>MOzfidan</dc:creator>
      <dc:date>2021-11-11T11:06:52Z</dc:date>
    </item>
  </channel>
</rss>

