Repository navigation
ci: Run the Flagsmith SDK behavioural spec - #147
Conversation
📝 Walkthrough
Merge Risk: 🟠 High · up to
|
There was a problem hiding this comment.
Actionable comments posted: 4
🔇 Additional comments: 4
.gitattributes: 1
9-9: LGTM!.php-cs-fixer.php: 1
7-7: LGTM!spec-adapter/Dockerfile-17-19: 1
17-19: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Run the container as a non-root user.
The image has no
USERinstruction, so the adapter runs as root. Add a non-root user beforeCMD. The Composer install runs earlier as root, so the user needs only read access to/sdk.Proposed fix
ENV PORT=8080 EXPOSE 8080 +USER www-data CMD ["php", "spec-adapter/adapter.php"]spec-adapter/composer.json-12-15: 1
12-15: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Run
composer auditfor the new dependency set.The change adds a new Composer project that requires
guzzlehttp/guzzle. The supplied context shows no dependency vulnerability scan for it. Add acomposer auditstep to CI forspec-adapter. Run it aftercomposer install.Source: Learnings
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
33890b45-15e7-490c-a5aa-db4faaeb9a30
📒 Files selected for processing: 7
.gitattributes.github/workflows/sdk-spec.yml.php-cs-fixer.phprenovate.jsonspec-adapter/Dockerfilespec-adapter/adapter.phpspec-adapter/composer.json
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
7cdfac7e-19b7-448a-aded-211a351010bc
📒 Files selected for processing: 4
.gitattributes.github/workflows/sdk-spec.ymlsdk-spec/Dockerfilesdk-spec/steps.php
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Runs the Flagsmith SDK behavioural spec against this SDK on every pull request and push to
main, using the steps-file design from Flagsmith/sdk-spec#3.sdk-spec/steps.php. One plain function per SDK step, marked with the Gherkin step text as a comment. It holds only SDK calls and the mapping to the spec's flag shape, so it doubles as a working usage example. The spec's PHP harness finds and runs the functions.sdk-spec/Dockerfile. Builds the SDK from source with Composer, with Guzzle as the PSR-18 client, and runs the harness on the steps file. Nocomposer.jsonis needed insdk-spec/. The directory isexport-ignored, so it is not shipped in the package..github/workflows/sdk-spec.yml. Calls the spec's reusable workflow withlanguage: php. It is pinned tov0.3.0.renovate.jsonbumps theuses:ref andspec-reftogether.The spec currently covers getting environment flags and getting identity flags with traits.