{"id":14971440,"url":"https://github.com/jkribeiro/drupal-composer-paranoia-acquia","last_synced_at":"2025-06-23T13:37:46.809Z","repository":{"id":55885794,"uuid":"113852162","full_name":"jkribeiro/drupal-composer-paranoia-acquia","owner":"jkribeiro","description":"Experimental Composer plugin to improve the security of composer-based Drupal projects by moving all PHP files out of docroot for Acquia environments.","archived":false,"fork":false,"pushed_at":"2020-12-09T14:23:24.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"1.x","last_synced_at":"2025-05-20T16:00:50.314Z","etag":null,"topics":["composer","drupal","drupal-8","security"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkribeiro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-11T11:44:45.000Z","updated_at":"2021-03-05T08:04:08.000Z","dependencies_parsed_at":"2022-08-15T08:40:18.254Z","dependency_job_id":null,"html_url":"https://github.com/jkribeiro/drupal-composer-paranoia-acquia","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jkribeiro/drupal-composer-paranoia-acquia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkribeiro%2Fdrupal-composer-paranoia-acquia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkribeiro%2Fdrupal-composer-paranoia-acquia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkribeiro%2Fdrupal-composer-paranoia-acquia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkribeiro%2Fdrupal-composer-paranoia-acquia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkribeiro","download_url":"https://codeload.github.com/jkribeiro/drupal-composer-paranoia-acquia/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkribeiro%2Fdrupal-composer-paranoia-acquia/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193425,"owners_count":23122951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","drupal","drupal-8","security"],"created_at":"2024-09-24T13:45:12.569Z","updated_at":"2025-06-23T13:37:41.793Z","avatar_url":"https://github.com/jkribeiro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drupal Composer paranoia mode for Acquia Cloud environments\nComposer plugin for improving the website security for composer-based Drupal projects by moving all PHP files out of docroot, for Acquia environments.\n\nThis plugin has the dependency of the [drupal-paranoia](https://github.com/drupal-composer/drupal-paranoia) plugin, performing additional installation steps to run the paranoia mode on Acquia Cloud environments.\n\nWould like to know more about it?\n- https://github.com/drupal-composer/drupal-paranoia\n- [Moving all PHP files out of the docroot](https://www.drupal.org/node/2767907)\n- [#1672986: Option to have all php files outside of web root](https://www.drupal.org/node/1672986)\n- [Remote Code Execution - SA-CONTRIB-2016-039](https://www.drupal.org/node/2765575)\n- https://twitter.com/drupalsecurity/status/753263548458004480\n\n## Configuration\nMake sure you have a [drupal-composer/drupal-project](https://github.com/drupal-composer/drupal-project)-based project created.\n\nRename your Acquia repo docroot directory to `app`.\n```\nmv docroot app\n```\n\nUpdate the `composer.json` of your root package with the following changes:\n```json\n\"extra\": {\n    \"installer-paths\": {\n        \"app/core\": [\"type:drupal-core\"],\n        \"app/libraries/{$name}\": [\"type:drupal-library\"],\n        \"app/modules/contrib/{$name}\": [\"type:drupal-module\"],\n        \"app/profiles/contrib/{$name}\": [\"type:drupal-profile\"],\n        \"app/themes/contrib/{$name}\": [\"type:drupal-theme\"],\n        \"drush/contrib/{$name}\": [\"type:drupal-drush\"]\n    },\n    \"drupal-paranoia\": {\n        \"app-dir\": \"app\",\n        \"web-dir\": \"docroot\"\n    }\n    \"...\"\n}\n```\n\nUse `composer require ...` to install this Plugin on your project.\n```\ncomposer require jkribeiro/drupal-composer-paranoia-acquia:~1\n```\n\nRun the following commands to make sure that the new folders are installed:\n```\ncomposer drupal:paranoia\ncomposer drupal:paranoia-acquia\n```\n\nDone! Plugin and new docroot are now installed.\n\n## Folder structure\nYour project now is basically structured on two folders.\n- __app__: Contains the files and folders of the full Drupal installation.\n- __docroot__: Contains only the __symlinks of the assets files__ and the __PHP stub files__ from the `app` folder.\n\nEvery time that you install or update a Drupal package via Composer, the `docroot` folder is automatically recreated.\n\nIf necessary, you can rebuild it manually, running the command\n```\ncomposer drupal:paranoia\n```\n\nThis could be necessary when updating themes images, CSS and JS files.\n\nLast step is to commit and push the changes to Acquia Cloud git repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkribeiro%2Fdrupal-composer-paranoia-acquia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkribeiro%2Fdrupal-composer-paranoia-acquia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkribeiro%2Fdrupal-composer-paranoia-acquia/lists"}