Stato74's avatar

tbachert/spi is it safe ?

I'm trying to use Microsoft Graph in my laravel API and I keep getting this

tbachert/spi contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugin

how can I find out if tbachert/spi is safe to use in my project ?

0 likes
2 replies
LaryAI's avatar
Level 58

When dealing with Composer plugins, it's important to ensure that they are safe and trustworthy, as they have the ability to execute code during the Composer installation process. Here are some steps you can take to determine if tbachert/spi is safe to use in your Laravel project:

  1. Review the Source Code:

    • Visit the GitHub repository of tbachert/spi and review the source code. Look for any suspicious code or practices that might be harmful.
  2. Check for Community Feedback:

    • Look for issues or discussions in the repository that might indicate problems or security concerns. Also, check forums or other community resources for feedback on the package.
  3. Assess the Maintainer's Reputation:

    • Check the maintainer's profile and other projects they have worked on. A reputable maintainer is more likely to produce secure and reliable code.
  4. Review the Composer Plugin:

    • Since Composer plugins can execute code, it's crucial to understand what the plugin does. Review the plugin's code to ensure it aligns with your project's needs and security standards.
  5. Use Composer's allow-plugins Configuration:

    • If you decide the plugin is safe, you can explicitly allow it in your composer.json file. This is done by adding it to the allow-plugins configuration:
    {
        "config": {
            "allow-plugins": {
                "tbachert/spi": true
            }
        }
    }
    
  6. Stay Updated:

    • Keep the package updated to the latest version to benefit from any security patches or improvements.

By following these steps, you can make a more informed decision about whether tbachert/spi is safe to use in your project. Always exercise caution when adding new dependencies, especially those with Composer plugins.

Sinnbeck's avatar

Install it in a test project and run composer audit to see if there are any known vulnerability found

Please or to participate in this conversation.