chiefy/vaulted

View on GitHub

Showing 91 of 98 total issues

Similar blocks of code found in 4 locations. Consider refactoring.
Open

Vaulted.createUser = Promise.method(function createUser(options, mountName) {
  options = options || {};

  return this.getAppidMapUserEndpoint(mountName)
    .post({
Severity: Major
Found in lib/auth/appid.js and 3 other locations - About 3 hrs to fix
lib/auth/appid.js on lines 59..69
lib/auth/token.js on lines 77..87
lib/backends/secret.js on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Vaulted.encryptTransitPlainText = Promise.method(function encryptTransitPlainText(options, mountName) {
  options = options || {};

  return this.getTransitEncryptEndpoint(mountName)
  .post({
Severity: Major
Found in lib/backends/transit.js and 2 other locations - About 3 hrs to fix
lib/backends/transit.js on lines 217..227
lib/backends/transit.js on lines 245..255

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Vaulted.rewrapTransitCipherText = Promise.method(function rewrapTransitCipherText(options, mountName) {
  options = options || {};

  return this.getTransitRewrapEndpoint(mountName)
    .post({
Severity: Major
Found in lib/backends/transit.js and 2 other locations - About 3 hrs to fix
lib/backends/transit.js on lines 189..199
lib/backends/transit.js on lines 217..227

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Vaulted.decryptTransitCipherText = Promise.method(function decryptTransitCipherText(options, mountName) {
  options = options || {};

  return this.getTransitDecryptEndpoint(mountName)
    .post({
Severity: Major
Found in lib/backends/transit.js and 2 other locations - About 3 hrs to fix
lib/backends/transit.js on lines 189..199
lib/backends/transit.js on lines 245..255

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

Vaulted.write = Promise.method(function writeSecret(options, mountName) {
  options = options || {};

  return this.getSecretEndpoint(mountName)
    .put({
Severity: Major
Found in lib/backends/secret.js and 3 other locations - About 3 hrs to fix
lib/auth/appid.js on lines 59..69
lib/auth/appid.js on lines 127..137
lib/auth/token.js on lines 77..87

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

Vaulted.renewToken = Promise.method(function renewToken(options, mountName) {
  options = options || {};

  return this.getTokenRenewEndpoint(mountName)
    .post({
Severity: Major
Found in lib/auth/token.js and 3 other locations - About 3 hrs to fix
lib/auth/appid.js on lines 59..69
lib/auth/appid.js on lines 127..137
lib/backends/secret.js on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

Vaulted.createApp = Promise.method(function createApp(options, mountName) {
  options = options || {};

  return this.getAppidMapAppEndpoint(mountName)
    .post({
Severity: Major
Found in lib/auth/appid.js and 3 other locations - About 3 hrs to fix
lib/auth/appid.js on lines 127..137
lib/auth/token.js on lines 77..87
lib/backends/secret.js on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 100.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.writeCubby = Promise.method(function writeCubby(options) {
  options = options || {};

  return this.getCubbyEndpoint()
    .put({
Severity: Major
Found in lib/backends/cubbyhole.js and 1 other location - About 3 hrs to fix
lib/sys/leases.js on lines 30..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.renewLease = Promise.method(function renewLease(options) {
  options = options || {};

  return this.getLeaseRenewEndpoint()
    .put({
Severity: Major
Found in lib/sys/leases.js and 1 other location - About 3 hrs to fix
lib/backends/cubbyhole.js on lines 30..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.setConfigCrl = Promise.method(function setConfigCrl(options, mountName) {
  options = utils.setDefaults(options, {
    expiry: '72h'
  });

Severity: Major
Found in lib/backends/pki.js and 1 other location - About 3 hrs to fix
lib/backends/pki.js on lines 678..689

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.signCertificateVerbatim = Promise.method(function signCertificateVerbatim(options, mountName) {
  options = utils.setDefaults(options, {
    format: 'pem'
  });

Severity: Major
Found in lib/backends/pki.js and 1 other location - About 3 hrs to fix
lib/backends/pki.js on lines 191..202

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.getCertRole = Promise.method(function getCertRole(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiRolesEndpoint(mountName)
    .get({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 150..158
lib/backends/pki.js on lines 237..245
lib/backends/pki.js on lines 368..376
lib/backends/pki.js on lines 418..426
lib/backends/pki.js on lines 519..527

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.setConfigUrls = Promise.method(function setConfigUrls(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiConfigUrlsEndpoint(mountName)
    .post({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 150..158
lib/backends/pki.js on lines 368..376
lib/backends/pki.js on lines 418..426
lib/backends/pki.js on lines 498..506
lib/backends/pki.js on lines 519..527

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.setSignedIntermediates = Promise.method(function setSignedIntermediates(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiInterSetSignedEndpoint(mountName)
    .post({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 150..158
lib/backends/pki.js on lines 237..245
lib/backends/pki.js on lines 418..426
lib/backends/pki.js on lines 498..506
lib/backends/pki.js on lines 519..527

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.revokeCertCredentials = Promise.method(function revokeCertCredentials(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiRevokeEndpoint(mountName)
    .post({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 150..158
lib/backends/pki.js on lines 237..245
lib/backends/pki.js on lines 368..376
lib/backends/pki.js on lines 498..506
lib/backends/pki.js on lines 519..527

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.deleteCertRole = Promise.method(function deleteCertRole(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiRolesEndpoint(mountName)
    .delete({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 150..158
lib/backends/pki.js on lines 237..245
lib/backends/pki.js on lines 368..376
lib/backends/pki.js on lines 418..426
lib/backends/pki.js on lines 498..506

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

Vaulted.setConfigCa = Promise.method(function setConfigCa(options, mountName) {
  options = utils.setDefaults(options);
  return this.getPkiConfigCaEndpoint(mountName)
    .post({
      headers: this.headers,
Severity: Major
Found in lib/backends/pki.js and 5 other locations - About 2 hrs to fix
lib/backends/pki.js on lines 237..245
lib/backends/pki.js on lines 368..376
lib/backends/pki.js on lines 418..426
lib/backends/pki.js on lines 498..506
lib/backends/pki.js on lines 519..527

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.disableAudit = Promise.method(function disableAudit(options) {
  options = utils.setDefaults(options);
  return this.getAuditEndpoint()
    .delete({
      headers: this.headers,
Severity: Major
Found in lib/sys/audit.js and 1 other location - About 2 hrs to fix
lib/sys/mounts.js on lines 142..150

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Vaulted.getMountTune = Promise.method(function getMountTune(options) {
  options = utils.setDefaults(options);
  return this.getTuneMountsEndpoint()
    .get({
      headers: this.headers,
Severity: Major
Found in lib/sys/mounts.js and 1 other location - About 2 hrs to fix
lib/sys/audit.js on lines 76..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 92.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

Vaulted.deleteApp = Promise.method(function deleteApp(options, mountName) {
  options = options || {};

  return this.getAppidMapAppEndpoint(mountName)
    .delete({
Severity: Major
Found in lib/auth/appid.js and 16 other locations - About 2 hrs to fix
lib/auth/appid.js on lines 35..44
lib/auth/appid.js on lines 104..113
lib/auth/appid.js on lines 150..159
lib/auth/token.js on lines 54..63
lib/auth/token.js on lines 100..109
lib/auth/token.js on lines 122..131
lib/auth/token.js on lines 144..153
lib/auth/token.js on lines 166..175
lib/auth/token.js on lines 188..197
lib/backends/consul.js on lines 38..46
lib/backends/consul.js on lines 96..104
lib/backends/consul.js on lines 117..125
lib/backends/secret.js on lines 55..64
lib/backends/transit.js on lines 81..90
lib/backends/transit.js on lines 105..114
lib/backends/transit.js on lines 158..167

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 91.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language