From 1e078cbaabba47a0058fdfb3db8d875b9e15195c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 14 Oct 2024 10:50:46 +0200 Subject: [PATCH] Revert "Update rule configuration (#179)" This reverts commit 668f0105b95e220e066325340e903e9734eaeb4c. --- rule-types/github/branch_protection_allow_deletions.yaml | 4 +++- rule-types/github/branch_protection_allow_force_pushes.yaml | 4 +++- rule-types/github/branch_protection_allow_fork_syncing.yaml | 4 +++- rule-types/github/branch_protection_enabled.yaml | 4 +++- rule-types/github/branch_protection_enforce_admins.yaml | 4 +++- rule-types/github/branch_protection_lock_branch.yaml | 4 +++- .../branch_protection_require_conversation_resolution.yaml | 4 +++- .../github/branch_protection_require_linear_history.yaml | 4 +++- ...tection_require_pull_request_approving_review_count.yaml | 4 +++- ..._protection_require_pull_request_code_owners_review.yaml | 4 +++- ...otection_require_pull_request_dismiss_stale_reviews.yaml | 4 +++- ..._protection_require_pull_request_last_push_approval.yaml | 4 +++- .../github/branch_protection_require_pull_requests.yaml | 4 +++- rule-types/github/branch_protection_require_signatures.yaml | 4 +++- rule-types/github/dependabot_configured.yaml | 6 ++++++ rule-types/github/security_insights.yaml | 2 ++ rule-types/github/security_insights_dep_policy.yaml | 2 ++ rule-types/github/security_policy.yaml | 2 ++ 18 files changed, 54 insertions(+), 14 deletions(-) diff --git a/rule-types/github/branch_protection_allow_deletions.yaml b/rule-types/github/branch_protection_allow_deletions.yaml index b301122..032d18a 100644 --- a/rule-types/github/branch_protection_allow_deletions.yaml +++ b/rule-types/github/branch_protection_allow_deletions.yaml @@ -28,7 +28,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: type: object diff --git a/rule-types/github/branch_protection_allow_force_pushes.yaml b/rule-types/github/branch_protection_allow_force_pushes.yaml index f66df1e..19e56df 100644 --- a/rule-types/github/branch_protection_allow_force_pushes.yaml +++ b/rule-types/github/branch_protection_allow_force_pushes.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: type: object diff --git a/rule-types/github/branch_protection_allow_fork_syncing.yaml b/rule-types/github/branch_protection_allow_fork_syncing.yaml index 65f5acd..706ebed 100644 --- a/rule-types/github/branch_protection_allow_fork_syncing.yaml +++ b/rule-types/github/branch_protection_allow_fork_syncing.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_enabled.yaml b/rule-types/github/branch_protection_enabled.yaml index 47845f2..81359b3 100644 --- a/rule-types/github/branch_protection_enabled.yaml +++ b/rule-types/github/branch_protection_enabled.yaml @@ -30,7 +30,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch rule_schema: {} # Defines the configuration for ingesting data relevant for the rule ingest: diff --git a/rule-types/github/branch_protection_enforce_admins.yaml b/rule-types/github/branch_protection_enforce_admins.yaml index ecca0b1..ee75aaf 100644 --- a/rule-types/github/branch_protection_enforce_admins.yaml +++ b/rule-types/github/branch_protection_enforce_admins.yaml @@ -26,7 +26,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_lock_branch.yaml b/rule-types/github/branch_protection_lock_branch.yaml index 48b4ac0..9d106b0 100644 --- a/rule-types/github/branch_protection_lock_branch.yaml +++ b/rule-types/github/branch_protection_lock_branch.yaml @@ -28,7 +28,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_conversation_resolution.yaml b/rule-types/github/branch_protection_require_conversation_resolution.yaml index 0bcd972..a358bf8 100644 --- a/rule-types/github/branch_protection_require_conversation_resolution.yaml +++ b/rule-types/github/branch_protection_require_conversation_resolution.yaml @@ -30,7 +30,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_linear_history.yaml b/rule-types/github/branch_protection_require_linear_history.yaml index b65f4a3..44c164f 100644 --- a/rule-types/github/branch_protection_require_linear_history.yaml +++ b/rule-types/github/branch_protection_require_linear_history.yaml @@ -28,7 +28,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_pull_request_approving_review_count.yaml b/rule-types/github/branch_protection_require_pull_request_approving_review_count.yaml index e0d012b..4a8a11a 100644 --- a/rule-types/github/branch_protection_require_pull_request_approving_review_count.yaml +++ b/rule-types/github/branch_protection_require_pull_request_approving_review_count.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_pull_request_code_owners_review.yaml b/rule-types/github/branch_protection_require_pull_request_code_owners_review.yaml index 7e4f1b2..a14db65 100644 --- a/rule-types/github/branch_protection_require_pull_request_code_owners_review.yaml +++ b/rule-types/github/branch_protection_require_pull_request_code_owners_review.yaml @@ -30,7 +30,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_pull_request_dismiss_stale_reviews.yaml b/rule-types/github/branch_protection_require_pull_request_dismiss_stale_reviews.yaml index 436165e..f7f0ccb 100644 --- a/rule-types/github/branch_protection_require_pull_request_dismiss_stale_reviews.yaml +++ b/rule-types/github/branch_protection_require_pull_request_dismiss_stale_reviews.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_pull_request_last_push_approval.yaml b/rule-types/github/branch_protection_require_pull_request_last_push_approval.yaml index 90dc30b..8cff1ff 100644 --- a/rule-types/github/branch_protection_require_pull_request_last_push_approval.yaml +++ b/rule-types/github/branch_protection_require_pull_request_last_push_approval.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_pull_requests.yaml b/rule-types/github/branch_protection_require_pull_requests.yaml index df0d46f..b53efc1 100644 --- a/rule-types/github/branch_protection_require_pull_requests.yaml +++ b/rule-types/github/branch_protection_require_pull_requests.yaml @@ -29,7 +29,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: properties: diff --git a/rule-types/github/branch_protection_require_signatures.yaml b/rule-types/github/branch_protection_require_signatures.yaml index b5b0e38..3b7134d 100644 --- a/rule-types/github/branch_protection_require_signatures.yaml +++ b/rule-types/github/branch_protection_require_signatures.yaml @@ -28,7 +28,9 @@ def: properties: branch: type: string - description: "The name of the branch to check. If not specified, the repository's default branch will be used." + description: "The name of the branch to check. If left empty, the default branch will be used." + required: + - branch # Defines the schema for writing a rule with this rule being checked rule_schema: type: object diff --git a/rule-types/github/dependabot_configured.yaml b/rule-types/github/dependabot_configured.yaml index 71ce5ab..cadd8ee 100644 --- a/rule-types/github/dependabot_configured.yaml +++ b/rule-types/github/dependabot_configured.yaml @@ -35,6 +35,11 @@ def: description: | The package ecosystem that the rule applies to. For example pip, gomod, npm, docker, github-actions, etc. + schedule_interval: + type: string + description: | + This option is no longer used. It's, however marked as required, so we can't remove + it for backwards compatibility. apply_if_file: type: string description: | @@ -42,6 +47,7 @@ def: This is useful for rules that are only applicable to certain types of repositories. required: - package_ecosystem + - schedule_interval # Defines the configuration for ingesting data relevant for the rule ingest: type: git diff --git a/rule-types/github/security_insights.yaml b/rule-types/github/security_insights.yaml index d9c97a2..9e5cc7c 100644 --- a/rule-types/github/security_insights.yaml +++ b/rule-types/github/security_insights.yaml @@ -40,6 +40,8 @@ def: description: | The path to the Security Insights file default: SECURITY-INSIGHTS.yml + required: + - filename # Defines the configuration for ingesting data relevant for the rule ingest: type: git diff --git a/rule-types/github/security_insights_dep_policy.yaml b/rule-types/github/security_insights_dep_policy.yaml index dddd257..8e193bf 100644 --- a/rule-types/github/security_insights_dep_policy.yaml +++ b/rule-types/github/security_insights_dep_policy.yaml @@ -44,6 +44,8 @@ def: description: | The path to the Security Insights file default: SECURITY-INSIGHTS.yml + required: + - filename # Defines the configuration for ingesting data relevant for the rule ingest: type: git diff --git a/rule-types/github/security_policy.yaml b/rule-types/github/security_policy.yaml index e0323ba..842dee5 100644 --- a/rule-types/github/security_policy.yaml +++ b/rule-types/github/security_policy.yaml @@ -24,6 +24,8 @@ def: description: | Path to the security policy file default: SECURITY.md + required: + - filename # Defines the configuration for ingesting data relevant for the rule ingest: type: git