Skip to content

fix: combine duplicate allowedTCPPorts into single list in firewall example#16

Merged
houseme merged 2 commits intofeature/improve-security-1from
copilot/sub-pr-15
Mar 3, 2026
Merged

fix: combine duplicate allowedTCPPorts into single list in firewall example#16
houseme merged 2 commits intofeature/improve-security-1from
copilot/sub-pr-15

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

The firewall example in docs/SECURITY.md had two separate allowedTCPPorts assignments — in Nix, the second silently overwrites the first, meaning only port 9001 would be opened.

Changes

  • docs/SECURITY.md: Merged the two allowedTCPPorts assignments into a single list so both ports are correctly declared
# Before (broken — second assignment overwrites first)
allowedTCPPorts = [ 9000 ];  # API port
allowedTCPPorts = [ 9001 ];  # Console port

# After
allowedTCPPorts = [ 9000 9001 ];  # API port and console port

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…xample

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor code based on feedback for Issue #9 improvements fix: combine duplicate allowedTCPPorts into single list in firewall example Mar 3, 2026
@houseme houseme marked this pull request as ready for review March 3, 2026 04:01
Copilot AI review requested due to automatic review settings March 3, 2026 04:01
@houseme houseme merged commit fcb2c98 into feature/improve-security-1 Mar 3, 2026
1 check passed
@houseme houseme deleted the copilot/sub-pr-15 branch March 3, 2026 04:02
Copy link
Contributor

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

Fixes an issue in the NixOS firewall example in docs/SECURITY.md where duplicate allowedTCPPorts assignments caused the first list to be silently overwritten, resulting in an incorrect/partial configuration.

Changes:

  • Combine duplicate allowedTCPPorts assignments into a single list so both ports are opened as intended.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +159 to 162
allowedTCPPorts = [ 9000 9001 ]; # API port and console port

# Or use interfaces for more granular control
interfaces.eth0.allowedTCPPorts = [ 9000 9001 ];
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The firewall snippet currently sets allowedTCPPorts globally and then says "Or use interfaces for more granular control" while also setting interfaces.eth0.allowedTCPPorts. This is confusing because the config shown is not an either/or example. Consider splitting this into two separate examples (global ports vs interface-scoped ports) or comment out/remove the global allowedTCPPorts line in the interface-specific example so the docs match the text.

Copilot uses AI. Check for mistakes.
houseme added a commit that referenced this pull request Mar 3, 2026
* feat: Issue #9 improvements and documentation reorganization

- Remove manual binary stripping and binutils
- Clarify sourceProvenance for pre-compiled binaries
- Migrate to environment attribute set (nixpkgs best practice)
- Replace shell script with %d placeholder
- Default to systemd journal logging
- Move detailed docs to docs/, remove duplicates
- Update all documentation references

* fix: combine duplicate allowedTCPPorts into single list in firewall example (#16)

* Initial plan

* fix: combine duplicate allowedTCPPorts into single list in firewall example

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

* fix: address PR #15 review feedback — secrets handling, broken links, optional logDirectory (#17)

* Initial plan

* fix: address remaining review comments - secrets handling, broken links, optional logDirectory

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

* fix: clarify CHANGELOG deprecated accessKey/secretKey semantics and required file path

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

* fix: remove hardcoded secrets from activation script example; align README with LoadCredential behavior

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

* add workflows config

* fix: CI — nixpkgs-fmt formatting violations and mkRenamedOptionModule arity (#18)

* Initial plan

* fix: resolve CI errors — invalid checkout@v6 and mkRenamedOptionModule 3-arg call

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

* fix: apply nixpkgs-fmt to all 3 failing files and restore checkout@v6

Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
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.

3 participants