Skip to content

Conversation

@skipper-vp
Copy link
Contributor

@skipper-vp skipper-vp commented May 13, 2025

#1611

SecKit update + tests.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected a comment to accurately reference Content Security Policy (CSP) instead of SCP.
  • Chores
    • Updated configuration to explicitly disable the 'upgrade-req' option within CSP settings in LOCAL and CI environments.
  • Documentation
    • Added a FAQ section addressing a common pipeline failure related to PHPUnit directory differences with a solution to run ahoy update-fixtures.
  • Tests
    • Expanded environment-specific test coverage for Acquia and Lagoon hosting, adding multiple new test cases to validate configuration and settings across various environment scenarios.

@coderabbitai
Copy link

coderabbitai bot commented May 13, 2025

"""

Walkthrough

A new configuration setting was added to disable the 'upgrade-req' option within the Content Security Policy (CSP) settings for CI and LOCAL environments. Corresponding test cases were updated to check for this setting. Additionally, a comment was corrected to accurately reference CSP. A FAQ entry was also added to address a PHPUnit pipeline failure related to directory differences. Furthermore, extensive new test cases were added for Acquia and Lagoon hosting environments to validate environment detection and configuration settings.

Changes

File(s) Change Summary
tests/phpunit/Drupal/EnvironmentSettingsTest.php
.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php
Updated test cases for LOCAL and CI environments to assert 'seckit.settings']['seckit_xss']['csp']['upgrade-req'] is set to FALSE.
web/sites/default/includes/modules/settings.seckit.php
.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.seckit.php
.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.seckit.php
Corrected comment from "Disable SCP" to "Disable CSP" and added configuration to disable CSP 'upgrade-req' in CI and LOCAL environments.
.vortex/README.md Added FAQ section addressing a PHPUnit pipeline failure related to directory differences with a solution to run ahoy update-fixtures.
.vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php Added new test methods to cover multiple Acquia environment variants verifying environment detection and configuration correctness.
.vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php Added multiple new test methods and data providers for Lagoon environment variable combinations, validating environment detection and configuration settings.

Sequence Diagram(s)

sequenceDiagram
    participant EnvTest as EnvironmentSettingsTest
    participant EnvLoader as Environment Loader
    participant Config as Configuration
    participant SecKit as SecKit Module

    EnvTest->>EnvLoader: Set environment variables (CI, LOCAL, Acquia, Lagoon)
    EnvLoader->>Config: Load environment-specific settings
    Config->>SecKit: Disable CSP 'checkbox' and 'upgrade-req' for CI/LOCAL
    EnvTest->>Config: Assert expected configuration values per environment
Loading

"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 034278f and f503a1d.

📒 Files selected for processing (8)
  • .vortex/README.md (1 hunks)
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.seckit.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.seckit.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • web/sites/default/includes/modules/settings.seckit.php (1 hunks)
🔇 Additional comments (13)
.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.seckit.php (2)

11-11: Comment updated to accurately refer to CSP rather than SCP

The comment has been corrected to properly reference "CSP" (Content Security Policy) instead of the previous incorrect "SCP" terminology. This improves clarity and accuracy of the documentation.


13-13: Appropriate security setting for non-HTTPS environments

Adding the explicit configuration to disable the 'upgrade-req' CSP directive in CI and LOCAL environments is a good security practice. This prevents upgrade-insecure-requests from being enforced in environments where HTTPS may not be available.

web/sites/default/includes/modules/settings.seckit.php (2)

11-11: Comment updated to accurately refer to CSP rather than SCP

The comment has been corrected to properly reference "CSP" (Content Security Policy) instead of the previous incorrect "SCP" terminology. This improves clarity and accuracy of the documentation.


13-13: Appropriate security setting for non-HTTPS environments

Adding the explicit configuration to disable the 'upgrade-req' CSP directive in CI and LOCAL environments is a good security practice. This prevents upgrade-insecure-requests from being enforced in environments where HTTPS may not be available.

.vortex/README.md (1)

5-8: Helpful FAQ addition for common pipeline issue

Adding this FAQ entry helps users quickly resolve the "PHPUnit directory differences" pipeline error. The solution to run ahoy update-fixtures from the .vortex folder is clear and actionable.

.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.seckit.php (2)

11-11: Comment updated to accurately refer to CSP rather than SCP

The comment has been corrected to properly reference "CSP" (Content Security Policy) instead of the previous incorrect "SCP" terminology. This improves clarity and accuracy of the documentation.


13-13: Appropriate security setting for non-HTTPS environments

Adding the explicit configuration to disable the 'upgrade-req' CSP directive in CI and LOCAL environments is a good security practice. This prevents upgrade-insecure-requests from being enforced in environments where HTTPS may not be available.

tests/phpunit/Drupal/EnvironmentSettingsTest.php (2)

345-347: Alphabetical ordering restored – looks good

The new 'upgrade-req' entry now follows 'checkbox', matching the file-header convention that config keys be sorted alphabetically.
No further action required.


390-392: Same change as above, already reviewed
The CI-block addition is identical to the LOCAL one and follows the same correct order.

.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php (2)

118-120: Ordering issue resolved in baseline fixture

'checkbox' precedes 'upgrade-req', so the earlier nitpick has been fixed here as well.


163-165: Duplicate of the previous baseline change
Nothing new to add.

.vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

5-48: Comprehensive data-provider entries 👍

The extended Acquia cases cover all documented environment strings and the boolean variant. This should prevent future regressions in environment detection logic.

.vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

5-185: Excellent edge-case coverage for Lagoon detection

The expanded matrix of LAGOON_* combinations is exhaustive and clearly documents the expected behaviour for tricky branch permutations.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to commit May 13, 2025 05:50 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8d3611 and f0ca308.

📒 Files selected for processing (4)
  • tests/behat/bootstrap/FeatureContext.php (2 hunks)
  • tests/behat/features/seckit.feature (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • web/sites/default/includes/modules/settings.seckit.php (1 hunks)
🧰 Additional context used
🪛 PHPStan (2.0.3)
tests/behat/bootstrap/FeatureContext.php

92-92: PHPDoc tag @SuppressWarnings has invalid value ((PHPMD.StaticAccess)): Unexpected token ".StaticAccess)", expected ')' at offset 171 on line 7

(phpDoc.parseError)


97-97: No error to ignore is reported on line 97.

(ignore.unmatchedLine)

⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-deployment (0)
  • GitHub Check: vortex-test-installer (8.2)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-common
🔇 Additional comments (7)
web/sites/default/includes/modules/settings.seckit.php (1)

11-13: Good changes to fix comment and align CSP settings.

The comment has been corrected from "SCP" to "CSP" for accuracy, and a new configuration setting has been added to explicitly disable the 'upgrade-req' option in CI and LOCAL environments. This aligns with the existing practice of disabling the CSP checkbox in these environments.

tests/phpunit/Drupal/EnvironmentSettingsTest.php (2)

345-347: Correct test coverage for the local environment settings.

Appropriate test assertion added for the new 'upgrade-req' CSP configuration setting in LOCAL environment.


390-391: Good test coverage for CI environment settings.

Test assertion added for the new 'upgrade-req' CSP configuration in CI environment. Note that the order of assertions differs slightly between LOCAL and CI environments (in LOCAL, 'upgrade-req' appears after 'checkbox', while in CI it appears before), but this doesn't affect functionality.

tests/behat/features/seckit.feature (2)

1-21: Well-structured UI test for SecKit configuration.

This scenario effectively tests the SecKit configuration UI by:

  1. Logging in as administrator
  2. Navigating to the SecKit configuration page
  3. Enabling CSP and specific options
  4. Verifying settings persistence

The test correctly uses the new checkbox handling step definitions from FeatureContext to ensure idempotent interactions.


22-25: Good header verification test.

This scenario correctly verifies that the "upgrade-insecure-requests" directive is not present in the Content-Security-Policy header, aligning with the configuration changes made in settings.seckit.php.

tests/behat/bootstrap/FeatureContext.php (2)

10-40: Good trait additions and imports.

Appropriate imports have been added for the Behat hooks and new traits (BlockTrait, JsTrait, ResponseTrait) have been included to support the SecKit feature tests.


99-135: Excellent checkbox handling step definitions.

The new step definitions for conditionally checking or unchecking checkboxes are well-implemented with proper error handling. These methods:

  1. Only toggle checkboxes if needed (avoiding unnecessary actions)
  2. Provide clear error messages when checkboxes aren't found
  3. Support the idempotent UI testing approach in the SecKit feature

This is a good pattern that could be reused in other UI tests.

Comment on lines 42 to 98
/**
* Original SecKit configuration.
*
* @var array<string, mixed>
*/
protected $originalSeckitConfig;

/**
* Save original SecKit configuration before running SecKit tests.
*
* @BeforeScenario @seckit
*/
public function saveSeckitConfigBeforeScenario(BeforeScenarioScope $scope): void {
if ($this->getDrupalParameter('drupal')['drupal_root']) {
// Only run this if we have a @api tag or can bootstrap Drupal.
$tags = $scope->getScenario()->getTags();
if (in_array('api', $tags)) {
// Save current SecKit configuration.
$this->originalSeckitConfig = $this->getConfigFactory()
->getEditable('seckit.settings')
->get();
}
}
}

/**
* Restore original SecKit configuration after running SecKit tests.
*
* @AfterScenario @seckit
*/
public function restoreSeckitConfigAfterScenario(AfterScenarioScope $scope): void {
if ($this->getDrupalParameter('drupal')['drupal_root'] && !empty($this->originalSeckitConfig)) {
// Only run this if we have a @api tag or can bootstrap Drupal.
$tags = $scope->getScenario()->getTags();
if (in_array('api', $tags)) {
// Restore the original configuration.
$this->getConfigFactory()
->getEditable('seckit.settings')
->setData($this->originalSeckitConfig)
->save();
}
}
}

/**
* Gets the config factory service.
*
* @return \Drupal\Core\Config\ConfigFactoryInterface
* The config factory service.
*
* @SuppressWarnings(PHPMD.StaticAccess)
*/
protected function getConfigFactory() {
// We need to use the static Drupal call here as we're in a Behat context.
// @phpstan-ignore-next-line
return Drupal::configFactory();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Well-implemented configuration management hooks.

Excellent implementation of hooks to save and restore SecKit configuration before and after scenarios. This ensures test isolation and prevents side effects between test runs.

The getConfigFactory() helper method appropriately accesses Drupal's config factory.

The @SuppressWarnings annotation on line 92 has a syntax issue according to static analysis. Consider fixing the format:

-  @SuppressWarnings(PHPMD.StaticAccess)
+  @SuppressWarnings("PHPMD.StaticAccess")

Also, line 97 has an unnecessary PHPStan ignore annotation that could be removed since no error is being reported:

-  // @phpstan-ignore-next-line
+  // Access Drupal static service
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* Original SecKit configuration.
*
* @var array<string, mixed>
*/
protected $originalSeckitConfig;
/**
* Save original SecKit configuration before running SecKit tests.
*
* @BeforeScenario @seckit
*/
public function saveSeckitConfigBeforeScenario(BeforeScenarioScope $scope): void {
if ($this->getDrupalParameter('drupal')['drupal_root']) {
// Only run this if we have a @api tag or can bootstrap Drupal.
$tags = $scope->getScenario()->getTags();
if (in_array('api', $tags)) {
// Save current SecKit configuration.
$this->originalSeckitConfig = $this->getConfigFactory()
->getEditable('seckit.settings')
->get();
}
}
}
/**
* Restore original SecKit configuration after running SecKit tests.
*
* @AfterScenario @seckit
*/
public function restoreSeckitConfigAfterScenario(AfterScenarioScope $scope): void {
if ($this->getDrupalParameter('drupal')['drupal_root'] && !empty($this->originalSeckitConfig)) {
// Only run this if we have a @api tag or can bootstrap Drupal.
$tags = $scope->getScenario()->getTags();
if (in_array('api', $tags)) {
// Restore the original configuration.
$this->getConfigFactory()
->getEditable('seckit.settings')
->setData($this->originalSeckitConfig)
->save();
}
}
}
/**
* Gets the config factory service.
*
* @return \Drupal\Core\Config\ConfigFactoryInterface
* The config factory service.
*
* @SuppressWarnings(PHPMD.StaticAccess)
*/
protected function getConfigFactory() {
// We need to use the static Drupal call here as we're in a Behat context.
// @phpstan-ignore-next-line
return Drupal::configFactory();
}
/**
* Gets the config factory service.
*
* @return \Drupal\Core\Config\ConfigFactoryInterface
* The config factory service.
*
* @SuppressWarnings("PHPMD.StaticAccess")
*/
protected function getConfigFactory() {
// We need to use the static Drupal call here as we're in a Behat context.
// Access Drupal static service
return Drupal::configFactory();
}
🧰 Tools
🪛 PHPStan (2.0.3)

92-92: PHPDoc tag @SuppressWarnings has invalid value ((PHPMD.StaticAccess)): Unexpected token ".StaticAccess)", expected ')' at offset 171 on line 7

(phpDoc.parseError)


97-97: No error to ignore is reported on line 97.

(ignore.unmatchedLine)

@skipper-vp skipper-vp closed this May 13, 2025
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex May 13, 2025
@skipper-vp skipper-vp reopened this May 13, 2025
@github-project-automation github-project-automation bot moved this from Release queue to To do for current release in Vortex May 13, 2025
@skipper-vp skipper-vp force-pushed the feature/1611-fix-seckit branch from f0ca308 to abc94a9 Compare May 13, 2025 06:33
@github-actions github-actions bot temporarily deployed to commit May 13, 2025 06:35 Inactive
@codecov
Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.56%. Comparing base (27a479f) to head (f503a1d).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1635   +/-   ##
========================================
  Coverage    71.56%   71.56%           
========================================
  Files           76       76           
  Lines         4308     4308           
========================================
  Hits          3083     3083           
  Misses        1225     1225           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@skipper-vp skipper-vp force-pushed the feature/1611-fix-seckit branch from abc94a9 to e687f47 Compare May 13, 2025 07:20
@github-actions github-actions bot temporarily deployed to commit May 13, 2025 07:21 Inactive
@skipper-vp skipper-vp force-pushed the feature/1611-fix-seckit branch from e687f47 to 034278f Compare May 13, 2025 07:32
@github-actions github-actions bot temporarily deployed to commit May 13, 2025 07:34 Inactive
@skipper-vp
Copy link
Contributor Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented May 13, 2025

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (3)
.vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php (2)

5-48: 🧹 Nitpick (assertive)

Great coverage, but consider consolidating duplicated environment cases

The expanded data-provider thoroughly enumerates Acquia edge-cases – nice!
However, identical cases now exist in three different test suites (core, baseline, Acquia). If these collections ever diverge, false-negatives will creep in.

Suggestion:
• Extract a shared EnvironmentProviderTrait (or similar) that yields the combinations once, and let each suite use it.
• Alternatively, move the provider to an abstract parent class.

This keeps the source of truth single and reduces test-maintenance effort.


60-137: 🧹 Nitpick (assertive)

Large, verbatim test methods could be generated instead

testEnvironmentAcquiaDynamic/Dev/Stage/Prod replicate the same assertion pattern with only a handful of differing variables. You can:

  1. Parameterise the differing env-vars & expected values and drive one generic method via @dataProvider,
  2. Or create a helper like assertAcquiaEnvironment(array $vars, string $expected, array $indicatorColours).

This will cut ~150 lines, improve readability, and make future additions trivial.

.vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

5-185: 🧹 Nitpick (assertive)

Exhaustive Lagoon matrix is valuable, but maintenance-heavy

The sheer number of combinations ensures safety, yet the list is already lengthy and could grow. Two ideas to keep it manageable:

  1. Generate cases programmatically in a provider (for loops over branch names & env-types) instead of hand-listing.
  2. Split into focused providers: “production-branch checks”, “regex-branch checks”, etc., so a future reader quickly grasps intent.

This reduces cognitive load and risk of inconsistent updates.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between e8d3611 and 034278f.

📒 Files selected for processing (8)
  • .vortex/README.md (1 hunks)
  • .vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • .vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.seckit.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.seckit.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1 hunks)
  • .vortex/installer/tests/Fixtures/install/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1 hunks)
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php (2 hunks)
  • web/sites/default/includes/modules/settings.seckit.php (1 hunks)
🔇 Additional comments (9)
.vortex/README.md (1)

5-8: Good addition of troubleshooting guidance.

This FAQ entry provides clear, actionable guidance for resolving a common pipeline failure. The instructions are concise and helpful for developers encountering PHPUnit directory differences errors.

.vortex/installer/tests/Fixtures/install/_baseline/web/sites/default/includes/modules/settings.seckit.php (2)

11-11: Corrected comment terminology from SCP to CSP.

The comment now correctly refers to Content Security Policy (CSP) instead of SCP, providing accurate documentation.


13-13: Good security enhancement: disabled CSP upgrade-req directive.

Adding this configuration ensures that both the main CSP enforcement and the upgrade-insecure-requests directive are properly disabled in non-HTTPS environments (CI and LOCAL). This prevents potential issues with mixed content warnings and blocked resources.

web/sites/default/includes/modules/settings.seckit.php (2)

11-11: Corrected comment terminology from SCP to CSP.

The comment now correctly refers to Content Security Policy (CSP) instead of SCP, providing accurate documentation.


13-13: Good security enhancement: disabled CSP upgrade-req directive.

Adding this configuration ensures that both the main CSP enforcement and the upgrade-insecure-requests directive are properly disabled in non-HTTPS environments (CI and LOCAL). This prevents potential issues with mixed content warnings and blocked resources.

.vortex/installer/tests/Fixtures/install/hosting_acquia/docroot/sites/default/includes/modules/settings.seckit.php (2)

11-11: Corrected comment terminology from SCP to CSP.

The comment now correctly refers to Content Security Policy (CSP) instead of SCP, providing accurate documentation.


13-13: Good security enhancement: disabled CSP upgrade-req directive.

Adding this configuration ensures that both the main CSP enforcement and the upgrade-insecure-requests directive are properly disabled in non-HTTPS environments (CI and LOCAL). This prevents potential issues with mixed content warnings and blocked resources.

tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

345-347: Addition looks correct & follows existing conventions

The new assertion for ['upgrade-req'] => FALSE is alphabetically after ['checkbox'], matching the file-header guidance and mirroring the change in the real settings.seckit.php. 🟢

.vortex/installer/tests/Fixtures/install/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php (1)

118-120: Change acknowledged

The extra CSP key is added in the proper alphabetical spot (checkboxupgrade-req). ✅

@skipper-vp skipper-vp force-pushed the feature/1611-fix-seckit branch from 034278f to f503a1d Compare May 13, 2025 08:43
@github-actions github-actions bot temporarily deployed to commit May 13, 2025 08:45 Inactive
@skipper-vp skipper-vp requested a review from AlexSkrypnyk May 13, 2025 10:28
@skipper-vp skipper-vp added the Needs review Pull request needs a review from assigned developers label May 13, 2025
@AlexSkrypnyk AlexSkrypnyk merged commit 06b603b into develop May 13, 2025
30 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/1611-fix-seckit branch May 13, 2025 17:59
@github-project-automation github-project-automation bot moved this from To do for current release to Release queue in Vortex May 13, 2025
@AlexSkrypnyk AlexSkrypnyk moved this from Release queue to Released in 25.6.0 in Vortex Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Pull request needs a review from assigned developers

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants