@@ -252,66 +252,16 @@ runs:
252252 env :
253253 EXPERIMENTAL_ALLOWED_DOMAINS : ${{ inputs.experimental_allowed_domains }}
254254
255- - name : Install Security Skills
255+ - name : Install Security Plugin
256256 if : steps.prepare.outputs.contains_trigger == 'true' && steps.prepare.outputs.install_security_skills == 'true'
257257 shell : bash
258258 run : |
259- echo "Installing security skills from Factory-AI/skills..."
260- SKILLS_DIR="$HOME/.factory/skills"
261- mkdir -p "$SKILLS_DIR"
262-
263- # Clone public skills repo (sparse checkout for efficiency)
264- TEMP_DIR=$(mktemp -d)
265- git clone --filter=blob:none --sparse \
266- "https://github.com/Factory-AI/skills.git" \
267- "$TEMP_DIR" 2>/dev/null || {
268- echo "Warning: Could not clone skills repo. Security skills will not be available."
269- exit 0
259+ echo "Installing security-engineer plugin from factory-plugins marketplace..."
260+ droid plugin marketplace add https://github.com/Factory-AI/factory-plugins 2>/dev/null || true
261+ droid plugin install security-engineer@factory-plugins --scope user 2>/dev/null || {
262+ echo "Warning: Could not install security-engineer plugin. Security review may have limited functionality."
270263 }
271-
272- cd "$TEMP_DIR"
273- git sparse-checkout set \
274- skills/threat-model-generation \
275- skills/commit-security-scan \
276- skills/vulnerability-validation \
277- skills/security-review 2>/dev/null || true
278-
279- # Copy skills to ~/.factory/skills/ and track installed count
280- INSTALLED_COUNT=0
281- for skill in threat-model-generation commit-security-scan vulnerability-validation security-review; do
282- if [ -d "skills/$skill" ]; then
283- cp -r "skills/$skill" "$SKILLS_DIR/"
284- echo " Installed skill: $skill"
285- INSTALLED_COUNT=$((INSTALLED_COUNT + 1))
286- else
287- echo " Warning: Skill not found in repo: $skill"
288- fi
289- done
290-
291- # Cleanup
292- rm -rf "$TEMP_DIR"
293-
294- # Verify at least one skill was installed
295- if [ "$INSTALLED_COUNT" -eq 0 ]; then
296- echo "Warning: No security skills were installed. The skills may not exist in the Factory-AI/skills repository."
297- echo "Security review will proceed but may have limited functionality."
298- else
299- echo "Security skills installation complete ($INSTALLED_COUNT skills installed)"
300- fi
301-
302- # Verify skills exist in the target directory
303- echo "Verifying installed skills in $SKILLS_DIR..."
304- VERIFIED_COUNT=0
305- for skill in threat-model-generation commit-security-scan vulnerability-validation security-review; do
306- if [ -d "$SKILLS_DIR/$skill" ]; then
307- echo " Verified: $skill"
308- VERIFIED_COUNT=$((VERIFIED_COUNT + 1))
309- fi
310- done
311-
312- if [ "$VERIFIED_COUNT" -ne "$INSTALLED_COUNT" ]; then
313- echo "Warning: Skill verification mismatch. Expected $INSTALLED_COUNT, found $VERIFIED_COUNT in $SKILLS_DIR"
314- fi
264+ echo "Security plugin installation complete"
315265
316266 - name : Run Droid Exec
317267 id : droid
0 commit comments