Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut new version #299

Open
oboyle opened this issue Jun 14, 2023 · 0 comments
Open

Cut new version #299

oboyle opened this issue Jun 14, 2023 · 0 comments

Comments

@oboyle
Copy link

oboyle commented Jun 14, 2023

Issue Report

I've developed rules that use the file-not-contents rule, specifically the contents field of the rule. This feature does not exist in the the current version (0.11.2) released to NPM but the feature exists in the current code in this repository. The ask is to cut a new version of Repolinter.

Steps to Reproduce the Issue

Install the module from NPM and attempt to use the contents field of a rule instead of content.

$ npm install repolinter
$ repolinter -r policy-below.json
Configuration validation failed with errors: 
	configuration.rules['rule-name'].rule.options should have required property 'content'

You can test using this rule set. The linter should run successfully, not generate the error above, and, if there are any Altavista email addresses in your code, generate a finding.

  "rules": {
    "rule-name": {
      "level": "warning",
      "rule": {
        "type": "file-not-contents",
        "options": {
          "globsAll": [
            "**/*"
          ],
          "contents": [
            "[email protected]",
            "[email protected]"
          ],
          "nocase": true,
          "flags": "gi",
          "fail-on-non-existent": false,
          "display-result-context": true
        }
      }
    }
  }
@hinricht hinricht mentioned this issue Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant