Skip to content

Conversation

@alonsobsd
Copy link

Description

This is a initial support for FreeBSD

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@deacon-mp deacon-mp requested a review from Copilot October 6, 2025 23:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Initial addition of FreeBSD support by updating training ability definitions to target FreeBSD.

  • Add FreeBSD to the platforms for several training abilities
  • Adjust platform selector keys in YAML ability files

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
data/abilities/training/fc4715ac-758e-4ba9-9e52-d07ff3d22a74.yml Added FreeBSD to platforms for cron-related training ability
data/abilities/training/f0d77555-fa79-4884-8afd-73d39f887879.yml Added FreeBSD to platforms for mail move operation
data/abilities/training/e13c4e45-d19f-440e-8a72-fad728a1789c.yml Added FreeBSD to platforms for mail cleanup
data/abilities/training/6d53c4a8-ecd3-4131-a7a2-704a5b43dd83.yml Added FreeBSD to platforms for netcat listener
data/abilities/training/18702cd3-8e98-4eb7-99d4-0d2816926af1.yml Added FreeBSD to platforms for shell profile update

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

name: x
platforms:
linux:
freebsd,linux:
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

This defines a single platform key literally named 'freebsd,linux' rather than two platforms. YAML will not split this key, so platform matching for either 'freebsd' or 'linux' will fail. Define separate platform entries (freebsd: and linux:) to ensure both are recognized.

Copilot uses AI. Check for mistakes.
name: x
platforms:
linux:
freebsd,linux:
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Using 'freebsd,linux' as a combined key creates an unknown platform name and will not match either FreeBSD or Linux. Split into two distinct platform keys so the loader/selector can correctly target both OSes.

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 13
freebsd,linux:
sh:
command: |
rm -f /var/mail/victim
rm -f /var/mail/victim
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Comma-separated platform names are not parsed into multiple platforms in YAML; this becomes one invalid platform key. Provide separate entries for freebsd: and linux: so this ability is discoverable on both platforms.

Suggested change
freebsd,linux:
sh:
command: |
rm -f /var/mail/victim
\ No newline at end of file
rm -f /var/mail/victim
freebsd:
sh:
command: |
rm -f /var/mail/victim
linux:
sh:
command: |
rm -f /var/mail/victim

Copilot uses AI. Check for mistakes.
Comment on lines +10 to 13
freebsd,linux:
sh:
command: |
nc -nlv 7011 &
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The platform key 'freebsd,linux' will not be recognized as either 'freebsd' or 'linux' by platform selectors. Define separate platform blocks per OS to maintain compatibility.

Suggested change
freebsd,linux:
sh:
command: |
nc -nlv 7011 &
freebsd:
sh:
command: |
nc -nlv 7011 &
linux:
sh:
command: |
nc -nlv 7011 &

Copilot uses AI. Check for mistakes.
repeatable: False
platforms:
linux:
freebsd,linux:
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

Combining OS names in a single YAML key results in an invalid platform identifier. Please split into two keys (freebsd: and linux:) so this step executes on both platforms as intended.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant