Repository: godaddy/kubernetes-external-secrets
Pull request #306 (2020-03-21 01:39:30)

[Snyk] Upgrade pino from 5.13.6 to 5.16.0
<h3>Snyk has created this PR to upgrade pino from 5.13.6 to 5.16.0.</h3>
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
<hr/>

- The recommended version is **3 versions** ahead of your current version.
- The recommended version was released **2 months ago**, on 2020-01-11.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>pino</b></summary>
    <ul>
      <li>
        <b>5.16.0</b> - <a href="https://github.com/pinojs/pino/releases/tag/v5.16.0">2020-01-11</a></br><ul>
<li>add <code>nestedKey</code> option <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="546016693" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/759" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/759/hovercard" href="https://github.com/pinojs/pino/pull/759">#759</a></li>
</ul>
      </li>
      <li>
        <b>5.15.0</b> - <a href="https://github.com/pinojs/pino/releases/tag/v5.15.0">2019-12-13</a></br><p><g-emoji class="g-emoji" alias="books" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4da.png">📚</g-emoji> PR:</p>
<ul>
<li>test(mixin): improve object test to ensure proper object assign order (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="526468815" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/745" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/745/hovercard" href="https://github.com/pinojs/pino/pull/745">#745</a>)</li>
<li>CI : Move from sleep to watch exists (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="530701575" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/748" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/748/hovercard" href="https://github.com/pinojs/pino/pull/748">#748</a>)</li>
<li>feat(bindings): allow setting of bindings (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537186246" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/754" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/754/hovercard" href="https://github.com/pinojs/pino/pull/754">#754</a>)</li>
</ul>
      </li>
      <li>
        <b>5.14.0</b> - <a href="https://github.com/pinojs/pino/releases/tag/v5.14.0">2019-11-21</a></br><p><g-emoji class="g-emoji" alias="books" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4da.png">📚</g-emoji> PR:</p>
<ul>
<li>catch potential write errors on fatal flush sync (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="520884599" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/740" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/740/hovercard" href="https://github.com/pinojs/pino/pull/740">#740</a>)</li>
<li>feat(mixin): add mixin config option (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="522890629" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/741" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/741/hovercard" href="https://github.com/pinojs/pino/pull/741">#741</a>)</li>
</ul>
      </li>
      <li>
        <b>5.13.6</b> - <a href="https://github.com/pinojs/pino/releases/tag/v5.13.6">2019-11-08</a></br><p><g-emoji class="g-emoji" alias="books" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4da.png">📚</g-emoji> PR:</p>
<ul>
<li>Bumped dependencies</li>
<li>fix(redaction): fix corner cases with paths (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="511070842" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/732" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/732/hovercard" href="https://github.com/pinojs/pino/pull/732">#732</a>)</li>
<li>Add MySQL/MariaDB transport (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="492515852" data-permission-text="Title is private" data-url="https://github.com/pinojs/pino/issues/708" data-hovercard-type="pull_request" data-hovercard-url="/pinojs/pino/pull/708/hovercard" href="https://github.com/pinojs/pino/pull/708">#708</a>)</li>
</ul>
      </li>
    </ul>
    from <a href="https://github.com/pinojs/pino/releases">pino GitHub release notes</a>
  </details>
</details>


<details>
  <summary><b>Commit messages</b></summary>
  </br>
  <details>
    <summary>Package name: <b>pino</b></summary>
    <ul>
      <li><a href="https://github.com/pinojs/pino/commit/6068257bbc8e3ebb73fe8f941e0e56a3eadb75d1">6068257</a> 5.16.0</li>
      <li><a href="https://github.com/pinojs/pino/commit/6fae12ac18be263adec23b01f50b66018c30a3f9">6fae12a</a> Merge pull request #759 from northscaler/object-key</li>
      <li><a href="https://github.com/pinojs/pino/commit/542e1652d311e71f78d41da2fe94a596edf52520">542e165</a> add pino-http-send to transport list (#760)</li>
      <li><a href="https://github.com/pinojs/pino/commit/e39774e0e8e377d36e487adb26135082c623bb5f">e39774e</a> fix(redaction): remove undefined entries for removed number and boolean values (#756)</li>
      <li><a href="https://github.com/pinojs/pino/commit/6d80dbf8cd9bb8632de783a1d3565f4fe307e184">6d80dbf</a> fix typos</li>
      <li><a href="https://github.com/pinojs/pino/commit/5d35a08d8665d77468d3f4233bffbcf008ce0f78">5d35a08</a> objectKey -&gt; nestedKey, no &quot;you&quot; in docs</li>
      <li><a href="https://github.com/pinojs/pino/commit/7538351b44ac83edec57cdd45c5275af7e7ad7f4">7538351</a> provide ISO8601 time format (#757)</li>
      <li><a href="https://github.com/pinojs/pino/commit/607662552ef8eb03c8871711b77113250aea9149">6076625</a> revert minor version bump</li>
      <li><a href="https://github.com/pinojs/pino/commit/be9464a4a5b9b20ad30b0672a2ef3c1497b16903">be9464a</a> support objectKey config</li>
      <li><a href="https://github.com/pinojs/pino/commit/d54a01788f0eef4892322a48d461b777ef162182">d54a017</a> docs: fix logo display in sidebar (#755)</li>
      <li><a href="https://github.com/pinojs/pino/commit/8e11dc9c85055f7e2eb15a37cf80e32bcad6dbf1">8e11dc9</a> Bumped v5.15.0</li>
      <li><a href="https://github.com/pinojs/pino/commit/1586df37ee9dce8f7fea143ec6e123d4b3f34af4">1586df3</a> feat(bindings): allow setting of bindings (#754)</li>
      <li><a href="https://github.com/pinojs/pino/commit/6fe7476f9a22933b775cf914eb7dec94827b21ce">6fe7476</a> CI : Move from sleep to watch exists (#748)</li>
      <li><a href="https://github.com/pinojs/pino/commit/29ceca49cfa0a0610cc7f26cdf2782ccd8edf169">29ceca4</a> test(mixin): improve object test to ensure proper object assign order (#745)</li>
      <li><a href="https://github.com/pinojs/pino/commit/84e2dc23e7e7dea139251439aae418120728e491">84e2dc2</a> 5.14.0</li>
      <li><a href="https://github.com/pinojs/pino/commit/f66326a3acaec8fbed654a3ec3154ff55bafc69e">f66326a</a> feat(mixin): add mixin config option (#741)</li>
      <li><a href="https://github.com/pinojs/pino/commit/b03028a6eded02242722937f16557184e977242b">b03028a</a> ci(travis): add Node.js 12+13 to Travis CI test matrix (#742)</li>
      <li><a href="https://github.com/pinojs/pino/commit/29a2419becce5d22d6b57f2ec6ad1dc3f089f397">29a2419</a> CI : Github action improvement (#744)</li>
      <li><a href="https://github.com/pinojs/pino/commit/edaedec79e8ed08d5ef09eed70e982c6d753de97">edaedec</a> CI : Add GitHub action (#743)</li>
      <li><a href="https://github.com/pinojs/pino/commit/919f5ad6f90c02f3b2d58ce1403c901db048d826">919f5ad</a> catch potential write errors on fatal flush sync (#740)</li>
    </ul>

   <a href="https://github.com/pinojs/pino/compare/0416d881c7cdc8ebf5c9f9121ee52f1765e505ad...6068257bbc8e3ebb73fe8f941e0e56a3eadb75d1">Compare</a>
  </details>
</details>
<hr/>

**Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.*

For more information:

🧐 [View latest project report](https://app.snyk.io/org/godaddy/project/6270a1f6-cc6e-4bdd-ad67-a6a95416099f?utm_source&#x3D;github&amp;utm_medium&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/godaddy/project/6270a1f6-cc6e-4bdd-ad67-a6a95416099f/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;upgrade-pr)

🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/godaddy/project/6270a1f6-cc6e-4bdd-ad67-a6a95416099f/settings/integration?pkg&#x3D;pino&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;upgrade-pr#auto-dep-upgrades)

<!--- (snyk:metadata:{"dependencies":[{"name":"pino","from":"5.13.6","to":"5.16.0"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/godaddy/project/6270a1f6-cc6e-4bdd-ad67-a6a95416099f?utm_source=github&utm_medium=upgrade-pr","projectPublicId":"6270a1f6-cc6e-4bdd-ad67-a6a95416099f","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":3,"publishedDate":"2020-01-11T16:26:50.911Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false}) --->



Patch:
diff --git a/lib/poller.js b/lib/poller.js
index ea61251..a9577b0 100644
--- a/lib/poller.js
+++ b/lib/poller.js
@@ -161,6 +161,9 @@ class Poller {
   }
 
   async _updateStatus (status) {
+    // Remove newlines, spaces, and tabs from status string
+    status = status.replace(/(\r\n|\n|\r| (?= ))/gm, '').replace(/\t/g, ' ')
+
     try {
       this._logger.debug(`updating status for ${this._namespace}/${this._name} to: ${status}`)
       await this._status.put({
diff --git a/package-lock.json b/package-lock.json
index d912e1d..7b80b91 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -783,6 +783,11 @@
       "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
       "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
     },
+    "atomic-sleep": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
+      "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="
+    },
     "aws-sdk": {
       "version": "2.575.0",
       "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.575.0.tgz",
@@ -5601,9 +5606,9 @@
       }
     },
     "pino": {
-      "version": "5.13.6",
-      "resolved": "https://registry.npmjs.org/pino/-/pino-5.13.6.tgz",
-      "integrity": "sha512-cYhvK4lopLnW/OtU3uRqBNsPiBt0Cdv97LGJg4yPGbGajlOjWWaODwD66q3Ynqnj6bSNw8HSofYcEOKZqh4Gcg==",
+      "version": "5.16.0",
+      "resolved": "https://registry.npmjs.org/pino/-/pino-5.16.0.tgz",
+      "integrity": "sha512-k9cDzHd9S/oYSQ9B9g9+7RXkfsZX78sQXERC8x4p2XArECZXULx9nqNwZvJHsLj779wPCt+ybN+dG8jFR70p6Q==",
       "requires": {
         "fast-redact": "^2.0.0",
         "fast-safe-stringify": "^2.0.7",
@@ -6250,10 +6255,11 @@
       }
     },
     "sonic-boom": {
-      "version": "0.7.6",
-      "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.6.tgz",
-      "integrity": "sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ==",
+      "version": "0.7.7",
+      "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.7.tgz",
+      "integrity": "sha512-Ei5YOo5J64GKClHIL/5evJPgASXFVpfVYbJV9PILZQytTK6/LCwHvsZJW2Ig4p9FMC2OrBrMnXKgRN/OEoAWfg==",
       "requires": {
+        "atomic-sleep": "^1.0.0",
         "flatstr": "^1.0.12"
       }
     },
diff --git a/package.json b/package.json
index 9b49f51..4b841df 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
     "lodash.merge": "^4.6.2",
     "make-promises-safe": "^5.1.0",
     "node-vault": "^0.9.8",
-    "pino": "^5.13.6",
+    "pino": "^5.16.0",
     "prom-client": "^11.5.3"
   },
   "devDependencies": {


Test patch:
diff --git a/lib/poller.test.js b/lib/poller.test.js
index ce747eb..3c7e2a1 100644
--- a/lib/poller.test.js
+++ b/lib/poller.test.js
@@ -405,6 +405,15 @@ describe('Poller', () => {
       expect(error).to.not.equal(undefined)
       expect(error.message).equals('Not Found')
     })
+
+    it('handles odd whitespace and newlines in status', async () => {
+      const poller = pollerFactory()
+
+      await poller._updateStatus('\n\n\nLots      of spaces\n\n\n').then(() => {
+        const statusMessage = externalSecretsApiMock.status.put.getCall(0).args[0].body.status.status
+        expect(statusMessage).to.equal('Lots of spaces')
+      })
+    })
   })
 
   describe('_scheduleNextPoll', () => {