markbates / markbates/refresh

codesign for osx

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
196
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hi Mark,

I'm working on a gobuffalo project and on refresh, if I listen on non-localhost, I get the dialog:

Do you want the application “yourapp-build” to accept incoming network connections?

I found that the following sequence of commands clears the warning

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --remove `pwd`/tmp/yourapp-build
sudo codesign --force --sign - `pwd`/tmp/payedge-build                            
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add `pwd`/tmp/yourapp-build             

And seems we can shove it into runner.go just before cmd is run:

func (m *Manager) runner() {
        var cmd *exec.Cmd
        for {
                <-m.Restart  // right after this

Any plans/thoughts on this topic?

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with runner.go and the Manager.runner method, especially the point immediately after the restart signal. Review how the temporary application is launched on macOS and compare it with the reported codesign and firewall command sequence. Done means the refresh workflow addresses the incoming-network-connections warning without requiring those manual commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
devtools, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.