<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Yash Mehta</title>
    <description>The latest articles on Forem by Yash Mehta (@ymehta).</description>
    <link>https://forem.com/ymehta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F316307%2Fd386bfc0-a594-4617-b3cf-3c04b2f6fc32.png</url>
      <title>Forem: Yash Mehta</title>
      <link>https://forem.com/ymehta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ymehta"/>
    <language>en</language>
    <item>
      <title>Customized Vulnerability Alerts delivered to your Slack Channel using GitHub Actions</title>
      <dc:creator>Yash Mehta</dc:creator>
      <pubDate>Mon, 13 Jan 2020 19:07:00 +0000</pubDate>
      <link>https://forem.com/ymehta/customized-vulnerability-alerts-delivered-to-your-slack-channel-using-github-actions-2o4j</link>
      <guid>https://forem.com/ymehta/customized-vulnerability-alerts-delivered-to-your-slack-channel-using-github-actions-2o4j</guid>
      <description>&lt;p&gt;With the increasing complexity of technology stack, managing endless threats and maintaining the security of your Infrastructure can be a significant challenge — and a time-consuming one. As a Developer and Security Engineer, I have to keep an eye on recent vulnerabilities related to technology stack so that vulnerabilities can be patched asap. &lt;/p&gt;

&lt;p&gt;NVD provides us Multiple Feeds containing vulnerabilities according to CVE specification but those feeds aren't human-readable and it requires manual efforts to check whether the products we're using are affected. There are multiple solutions available in the market but those are mainly commercial or require configuring one or another infrastructure. So, I built a simple GitHub action that can be used easily and doesn't require any maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why GitHub Actions?
&lt;/h2&gt;

&lt;p&gt;GitHub Actions enables you to create custom software development life cycle (SDLC) workflows directly in your GitHub repository. GitHub Actions are complete &lt;strong&gt;free&lt;/strong&gt; for open-source repositories and allow 3000 minutes per month free usage for Private Repositories. Also, GitHub WorkFlows can be triggered based on scheduled events. &lt;/p&gt;

&lt;h3&gt;
  
  
  What you'll need?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://slack.com/intl/en-in/help/articles/115005265063-Incoming-WebHooks-for-Slack"&gt;A Slack Incoming Webhook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nvd.nist.gov/products/cpe/search"&gt;CPE ID of products that you want to monitor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Public/Private GitHub Repository&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/y-mehta"&gt;
        y-mehta
      &lt;/a&gt; / &lt;a href="https://github.com/y-mehta/vulnalerts"&gt;
        vulnalerts
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Get new vulnerability alerts daily straight to your slack channel using GitHub Actions for Free.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
VulnAlerts - Customized CVE Alerts straight to your Slack Channel&lt;/h1&gt;
&lt;h2&gt;
How to Use?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://slack.com/intl/en-in/help/articles/115005265063-Incoming-WebHooks-for-Slack" rel="nofollow"&gt;Create an Incoming Webhook on Slack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Goto Repository Settings -&amp;gt; Secrets -&amp;gt; Add a New Secret&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;SLACK_WEBHOOK&lt;/code&gt; in the Secret Name and your slack webhook in the value.&lt;/li&gt;
&lt;li&gt;Add CPEs of the products that you want to monitor for vulnerabilities in the &lt;strong&gt;cpe.txt&lt;/strong&gt; file. &lt;a href="https://nvd.nist.gov/products/cpe/search" rel="nofollow"&gt;NVD CPE Search&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Create new workflow in .github/workflows/alerts.yml&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;name: VulnAlerts
on
  schedule
    - cron:  '15 * */1 * *'

jobs:
  alert:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: y-mehta/vulnalerts@master
      env:
        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    - name: done
      run: echo 'done'
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;That's it. You'll receive daily alerts on the selected slack channel.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: No need to enter full CPE unless you want to monitor specific version. &lt;code&gt;apple:icloud&lt;/code&gt; or &lt;code&gt;atlassian:sourcetree&lt;/code&gt; will do the job.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Action Schedule can be changed in &lt;code&gt;.github/workflows/alerts.yml&lt;/code&gt; if needed. Follow crontab format(@daily,@monthly etc. aren't supported by Github Actions)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
How&lt;/h2&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/y-mehta/vulnalerts"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Sample Alert:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--led83jXm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/24428063/72280765-19bf9380-365f-11ea-84d3-395a78343f3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--led83jXm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/24428063/72280765-19bf9380-365f-11ea-84d3-395a78343f3e.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Use?
&lt;/h3&gt;

&lt;p&gt;Step 1:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Goto Repository Settings -&amp;gt; Secrets -&amp;gt; Add a New Secret&lt;/li&gt;
&lt;li&gt;Enter

&lt;code&gt;SLACK_WEBHOOK&lt;/code&gt;

in the Secret Name and your slack webhook in the value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add CPEs of the products that you want to monitor for vulnerabilities in the &lt;strong&gt;cpe.txt&lt;/strong&gt; file. [Each CPE on new line]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 3:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create new workflow in .github/workflows/alerts.yml
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: VulnAlerts

on: 
  schedule:
    - cron:  '15 * */1 * *'

jobs:
  alert:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: y-mehta/vulnalerts@master
      env:
        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    - name: done
      run: echo 'done'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;That's it. You'll receive daily alerts on the selected slack channel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would love feedback from other people working on similar things.&lt;/p&gt;

</description>
      <category>security</category>
      <category>devops</category>
      <category>github</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
