From b0a9091c2f7b0c6569befad9f62d2b4aa78dc442 Mon Sep 17 00:00:00 2001 From: Umberto Baldi <34278123+umbynos@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:10:08 +0100 Subject: [PATCH 01/51] move tests using staging index to production one (#932) --- index/index_test.go | 4 ++-- main_test.go | 4 ++-- tools/tools.go | 2 +- v2/pkgs/tools_test.go | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/index/index_test.go b/index/index_test.go index ea6433574..4a19a02be 100644 --- a/index/index_test.go +++ b/index/index_test.go @@ -9,12 +9,12 @@ import ( ) func TestInit(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index tempDir := paths.New(t.TempDir()).Join(".arduino-create") Index := Init(indexURL, tempDir) require.DirExists(t, tempDir.String()) - fileName := "package_staging_index.json" + fileName := "package_index.json" signatureName := fileName + ".sig" parsedURL, _ := url.Parse(indexURL) require.Equal(t, Index.IndexURL, *parsedURL) diff --git a/main_test.go b/main_test.go index 9abb5d781..c8276bba8 100644 --- a/main_test.go +++ b/main_test.go @@ -89,7 +89,7 @@ func TestUploadHandlerAgainstEvilFileNames(t *testing.T) { func TestInstallToolV2(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -170,7 +170,7 @@ func TestInstallToolV2(t *testing.T) { } func TestInstalledHead(t *testing.T) { - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) diff --git a/tools/tools.go b/tools/tools.go index ac3e6109b..e641db351 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -37,7 +37,7 @@ import ( // Usage: // You have to call the New() function passing it the required parameters: // -// index = index.Init("https://downloads.arduino.cc/packages/package_staging_index.json", dataDir) +// index = index.Init("https://downloads.arduino.cc/packages/package_index.json", dataDir) // tools := tools.New(dataDir, index, logger) // Tools will represent the installed tools diff --git a/v2/pkgs/tools_test.go b/v2/pkgs/tools_test.go index ae76ebfa0..78c56398f 100644 --- a/v2/pkgs/tools_test.go +++ b/v2/pkgs/tools_test.go @@ -41,7 +41,7 @@ func TestTools(t *testing.T) { } defer os.RemoveAll(tmp) - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -122,7 +122,7 @@ func TestEvilFilename(t *testing.T) { // Initialize indexes with a temp folder tmp := t.TempDir() - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) @@ -191,7 +191,7 @@ func TestInstalledHead(t *testing.T) { // Initialize indexes with a temp folder tmp := t.TempDir() - indexURL := "https://downloads.arduino.cc/packages/package_staging_index.json" + indexURL := "https://downloads.arduino.cc/packages/package_index.json" // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) From 51f4ee412e75db3b578c000ae223805484d6b424 Mon Sep 17 00:00:00 2001 From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:34:29 +0200 Subject: [PATCH 02/51] Remove existing certificates from the keychain (#933) * Add function to uninstall certificate from the system keychain * Remove certificates from the keychain using the systray icon * Improve error messages when installing and uninstalling certificates * Remove certificate from the keychain if an error occurs during install --- certificates/install_darwin.go | 45 ++++++++++++++++++++++++++++++++- certificates/install_default.go | 6 +++++ systray/systray_real.go | 12 +++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/certificates/install_darwin.go b/certificates/install_darwin.go index 134a4bc0c..2c84d7dcb 100644 --- a/certificates/install_darwin.go +++ b/certificates/install_darwin.go @@ -18,7 +18,9 @@ package certificates //inspired by https://stackoverflow.com/questions/12798950/ios-install-ssl-certificate-programmatically /* +// Explicitly tell the GCC compiler that the language is Objective-C. #cgo CFLAGS: -x objective-c +// Pass the list of macOS frameworks needed by this piece of Objective-C code. #cgo LDFLAGS: -framework Cocoa #import @@ -61,6 +63,32 @@ const char *installCert(const char *path) { return ""; } +const char *uninstallCert() { + // Each line is a key-value of the dictionary. Note: the the inverted order, value first then key. + NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys: + (id)kSecClassCertificate, kSecClass, + CFSTR("Arduino"), kSecAttrLabel, + kSecMatchLimitOne, kSecMatchLimit, + kCFBooleanTrue, kSecReturnAttributes, + nil]; + + OSStatus err = noErr; + // Use this function to check for errors + err = SecItemCopyMatching((CFDictionaryRef)dict, nil); + if (err == noErr) { + err = SecItemDelete((CFDictionaryRef)dict); + if (err != noErr) { + NSString *errString = [@"Could not delete the certificates. Error: " stringByAppendingFormat:@"%d", err]; + NSLog(@"%@", errString); + return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];; + } + } else if (err != errSecItemNotFound){ + NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err]; + NSLog(@"%@", errString); + return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];; + } + return ""; +} */ import "C" import ( @@ -82,7 +110,22 @@ func InstallCertificate(cert *paths.Path) error { p := C.installCert(ccert) s := C.GoString(p) if len(s) != 0 { - oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Error installing certificates\"") + oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"") + _ = oscmd.Run() + _ = UninstallCertificates() + return errors.New(s) + } + return nil +} + +// UninstallCertificates will uninstall the certificates from the system keychain on macos, +// if something goes wrong will show a dialog with the error and return an error +func UninstallCertificates() error { + log.Infof("Uninstalling certificates") + p := C.uninstallCert() + s := C.GoString(p) + if len(s) != 0 { + oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error uninstalling certificates\"") _ = oscmd.Run() return errors.New(s) } diff --git a/certificates/install_default.go b/certificates/install_default.go index 2a1cf794f..1b7f24bb9 100644 --- a/certificates/install_default.go +++ b/certificates/install_default.go @@ -30,3 +30,9 @@ func InstallCertificate(cert *paths.Path) error { log.Warn("platform not supported for the certificate install") return errors.New("platform not supported for the certificate install") } + +// UninstallCertificates won't do anything on unsupported Operative Systems +func UninstallCertificates() error { + log.Warn("platform not supported for the certificates uninstall") + return errors.New("platform not supported for the certificates uninstall") +} diff --git a/systray/systray_real.go b/systray/systray_real.go index 9e4e5aac1..62e52e21d 100644 --- a/systray/systray_real.go +++ b/systray/systray_real.go @@ -64,12 +64,15 @@ func (s *Systray) start() { s.updateMenuItem(mRmCrashes, config.LogsIsEmpty()) mGenCerts := systray.AddMenuItem("Generate and Install HTTPS certificates", "HTTPS Certs") + mRemoveCerts := systray.AddMenuItem("Remove HTTPS certificates", "") // On linux/windows chrome/firefox/edge(chromium) the agent works without problems on plain HTTP, // so we disable the menuItem to generate/install the certificates if runtime.GOOS != "darwin" { s.updateMenuItem(mGenCerts, true) + s.updateMenuItem(mRemoveCerts, true) } else { s.updateMenuItem(mGenCerts, config.CertsExist()) + s.updateMenuItem(mRemoveCerts, !config.CertsExist()) } // Add pause/quit @@ -103,6 +106,15 @@ func (s *Systray) start() { cert.DeleteCertificates(certDir) } s.Restart() + case <-mRemoveCerts.ClickedCh: + err := cert.UninstallCertificates() + if err != nil { + log.Errorf("cannot uninstall certificates something went wrong: %s", err) + } else { + certDir := config.GetCertificatesDir() + cert.DeleteCertificates(certDir) + } + s.Restart() case <-mPause.ClickedCh: s.Pause() case <-mQuit.ClickedCh: From 8e28a0ca4fdf76152c36abb2a2dfe894301879c4 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 16 Apr 2024 16:47:06 +0200 Subject: [PATCH 03/51] Removed unnecessary use of channels (#938) --- main.go | 2 - serial.go | 114 +++++++++++++++++++------------------------------- serialport.go | 4 +- 3 files changed, 44 insertions(+), 76 deletions(-) diff --git a/main.go b/main.go index 65b8219ad..45ae5259c 100755 --- a/main.go +++ b/main.go @@ -346,8 +346,6 @@ func loop() { go serialPorts.Run() // launch the hub routine which is the singleton for the websocket server go h.run() - // launch our serial port routine - go sh.run() // launch our dummy data routine //go d.run() diff --git a/serial.go b/serial.go index 393f77658..f576c60a5 100755 --- a/serial.go +++ b/serial.go @@ -29,25 +29,10 @@ import ( "github.com/sirupsen/logrus" ) -type writeRequest struct { - p *serport - d string - buffer string -} - type serialhub struct { // Opened serial ports. ports map[*serport]bool - //write chan *serport, chan []byte - write chan writeRequest - - // Register requests from the connections. - register chan *serport - - // Unregister requests from connections. - unregister chan *serport - mu sync.Mutex } @@ -75,46 +60,39 @@ type SpPortItem struct { var serialPorts SerialPortList var sh = serialhub{ - //write: make(chan *serport, chan []byte), - write: make(chan writeRequest), - register: make(chan *serport), - unregister: make(chan *serport), - ports: make(map[*serport]bool), + ports: make(map[*serport]bool), } -func (sh *serialhub) run() { - - //log.Print("Inside run of serialhub") - //cmdIdCtr := 0 - - for { - select { - case p := <-sh.register: - sh.mu.Lock() - //log.Print("Registering a port: ", p.portConf.Name) - h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Got register/open on port.\",\"Port\":\"" + p.portConf.Name + "\",\"Baud\":" + strconv.Itoa(p.portConf.Baud) + ",\"BufferType\":\"" + p.BufferType + "\"}") - sh.ports[p] = true - sh.mu.Unlock() - case p := <-sh.unregister: - sh.mu.Lock() - //log.Print("Unregistering a port: ", p.portConf.Name) - h.broadcastSys <- []byte("{\"Cmd\":\"Close\",\"Desc\":\"Got unregister/close on port.\",\"Port\":\"" + p.portConf.Name + "\",\"Baud\":" + strconv.Itoa(p.portConf.Baud) + "}") - delete(sh.ports, p) - close(p.sendBuffered) - close(p.sendNoBuf) - sh.mu.Unlock() - case wr := <-sh.write: - // if user sent in the commands as one text mode line - switch wr.buffer { - case "send": - wr.p.sendBuffered <- wr.d - case "sendnobuf": - wr.p.sendNoBuf <- []byte(wr.d) - case "sendraw": - wr.p.sendRaw <- wr.d - } - // no default since we alredy verified in spWrite() - } +// Register serial ports from the connections. +func (sh *serialhub) Register(port *serport) { + sh.mu.Lock() + //log.Print("Registering a port: ", p.portConf.Name) + h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Got register/open on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + ",\"BufferType\":\"" + port.BufferType + "\"}") + sh.ports[port] = true + sh.mu.Unlock() +} + +// Unregister requests from connections. +func (sh *serialhub) Unregister(port *serport) { + sh.mu.Lock() + //log.Print("Unregistering a port: ", p.portConf.Name) + h.broadcastSys <- []byte("{\"Cmd\":\"Close\",\"Desc\":\"Got unregister/close on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + "}") + delete(sh.ports, port) + close(port.sendBuffered) + close(port.sendNoBuf) + sh.mu.Unlock() +} + +// Write data to the serial port. +func (sh *serialhub) Write(port *serport, data string, sendMode string) { + // if user sent in the commands as one text mode line + switch sendMode { + case "send": + port.sendBuffered <- data + case "sendnobuf": + port.sendNoBuf <- []byte(data) + case "sendraw": + port.sendRaw <- data } } @@ -296,38 +274,30 @@ func spWrite(arg string) { spErr(errstr) return } + bufferingMode := args[0] portname := strings.Trim(args[1], " ") - //log.Println("The port to write to is:" + portname + "---") - //log.Println("The data is:" + args[2] + "---") + data := args[2] - // see if we have this port open - myport, isFound := sh.FindPortByName(portname) + //log.Println("The port to write to is:" + portname + "---") + //log.Println("The data is:" + data + "---") - if !isFound { + // See if we have this port open + port, ok := sh.FindPortByName(portname) + if !ok { // we couldn't find the port, so send err spErr("We could not find the serial port " + portname + " that you were trying to write to.") return } - // we found our port - // create our write request - var wr writeRequest - wr.p = myport - - // see if args[0] is send or sendnobuf or sendraw - switch args[0] { + // see if bufferingMode is valid + switch bufferingMode { case "send", "sendnobuf", "sendraw": - wr.buffer = args[0] + // valid buffering mode, go ahead default: spErr("Unsupported send command:" + args[0] + ". Please specify a valid one") return } - // include newline or not in the write? that is the question. - // for now lets skip the newline - //wr.d = []byte(args[2] + "\n") - wr.d = args[2] //[]byte(args[2]) - // send it to the write channel - sh.write <- wr + sh.Write(port, data, bufferingMode) } diff --git a/serialport.go b/serialport.go index 09fd2cda1..084d7c9a9 100755 --- a/serialport.go +++ b/serialport.go @@ -323,8 +323,8 @@ func spHandlerOpen(portname string, baud int, buftype string) { bw.Init() p.bufferwatcher = bw - sh.register <- p - defer func() { sh.unregister <- p }() + sh.Register(p) + defer sh.Unregister(p) serialPorts.List() From c42fcd727840bc4ae112b2836f8194290b5054ad Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 16 Apr 2024 17:55:43 +0200 Subject: [PATCH 04/51] Restore functionality of 'is_open' field in portlist (#939) * Restore functionality of 'is_open' field in portlist * Added comments --- serial.go | 29 +++++++++++++++++++++++++++++ serialport.go | 4 ++++ 2 files changed, 33 insertions(+) diff --git a/serial.go b/serial.go index f576c60a5..96778734f 100755 --- a/serial.go +++ b/serial.go @@ -239,6 +239,35 @@ func (sp *SerialPortList) remove(removedPort *discovery.Port) { }) } +// MarkPortAsOpened marks a port as opened by the user +func (sp *SerialPortList) MarkPortAsOpened(portname string) { + sp.portsLock.Lock() + defer sp.portsLock.Unlock() + port := sp.getPortByName(portname) + if port != nil { + port.IsOpen = true + } +} + +// MarkPortAsClosed marks a port as no more opened by the user +func (sp *SerialPortList) MarkPortAsClosed(portname string) { + sp.portsLock.Lock() + defer sp.portsLock.Unlock() + port := sp.getPortByName(portname) + if port != nil { + port.IsOpen = false + } +} + +func (sp *SerialPortList) getPortByName(portname string) *SpPortItem { + for _, port := range sp.Ports { + if port.Name == portname { + return port + } + } + return nil +} + func spErr(err string) { //log.Println("Sending err back: ", err) //h.broadcastSys <- []byte(err) diff --git a/serialport.go b/serialport.go index 084d7c9a9..43c810ff2 100755 --- a/serialport.go +++ b/serialport.go @@ -39,6 +39,7 @@ type serport struct { // The serial port connection. portConf *SerialConfig portIo io.ReadWriteCloser + portName string // Keep track of whether we're being actively closed // just so we don't show scary error messages @@ -305,6 +306,7 @@ func spHandlerOpen(portname string, baud int, buftype string) { sendRaw: make(chan string), portConf: conf, portIo: sp, + portName: portname, BufferType: buftype} var bw Bufferflow @@ -326,6 +328,7 @@ func spHandlerOpen(portname string, baud int, buftype string) { sh.Register(p) defer sh.Unregister(p) + serialPorts.MarkPortAsOpened(portname) serialPorts.List() // this is internally buffered thread to not send to serial port if blocked @@ -349,5 +352,6 @@ func spHandlerClose(p *serport) { func spCloseReal(p *serport) { p.bufferwatcher.Close() p.portIo.Close() + serialPorts.MarkPortAsClosed(p.portName) serialPorts.List() } From a462190f4f0050254a2c76187123bf12572f59ae Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 17 Apr 2024 13:51:44 +0200 Subject: [PATCH 05/51] Another round of code clean-up (#940) * Removed unused variable * Removed always-true condition * Make Write a method of serport * Removed useless counter itemsInBuffer * Made spCloseRead a method of serialport * Inlined spHandlerClose --- conn.go | 4 ---- serial.go | 29 ++++------------------------- serialport.go | 41 ++++++++++++++++++++--------------------- 3 files changed, 24 insertions(+), 50 deletions(-) diff --git a/conn.go b/conn.go index 02b13ba8d..727a5cadb 100644 --- a/conn.go +++ b/conn.go @@ -124,9 +124,6 @@ func uploadHandler(c *gin.Context) { return } - var filePaths []string - filePaths = append(filePaths, filePath) - tmpdir, err := os.MkdirTemp("", "extrafiles") if err != nil { c.String(http.StatusBadRequest, err.Error()) @@ -139,7 +136,6 @@ func uploadHandler(c *gin.Context) { c.String(http.StatusBadRequest, err.Error()) return } - filePaths = append(filePaths, path) log.Printf("Saving %s on %s", extraFile.Filename, path) err = os.MkdirAll(filepath.Dir(path), 0744) diff --git a/serial.go b/serial.go index 96778734f..64e5b8f7f 100755 --- a/serial.go +++ b/serial.go @@ -83,19 +83,6 @@ func (sh *serialhub) Unregister(port *serport) { sh.mu.Unlock() } -// Write data to the serial port. -func (sh *serialhub) Write(port *serport, data string, sendMode string) { - // if user sent in the commands as one text mode line - switch sendMode { - case "send": - port.sendBuffered <- data - case "sendnobuf": - port.sendNoBuf <- []byte(data) - case "sendraw": - port.sendRaw <- data - } -} - func (sh *serialhub) FindPortByName(portname string) (*serport, bool) { sh.mu.Lock() defer sh.mu.Unlock() @@ -275,18 +262,10 @@ func spErr(err string) { } func spClose(portname string) { - // look up the registered port by name - // then call the close method inside serialport - // that should cause an unregister channel call back - // to myself - - myport, isFound := sh.FindPortByName(portname) - - if isFound { - // we found our port - spHandlerClose(myport) + if myport, ok := sh.FindPortByName(portname); ok { + h.broadcastSys <- []byte("Closing serial port " + portname) + myport.Close() } else { - // we couldn't find the port, so send err spErr("We could not find the serial port " + portname + " that you were trying to close.") } } @@ -328,5 +307,5 @@ func spWrite(arg string) { } // send it to the write channel - sh.Write(port, data, bufferingMode) + port.Write(data, bufferingMode) } diff --git a/serialport.go b/serialport.go index 43c810ff2..a11483f63 100755 --- a/serialport.go +++ b/serialport.go @@ -47,9 +47,6 @@ type serport struct { isClosingDueToError bool - // counter incremented on queue, decremented on write - itemsInBuffer int - // buffered channel containing up to 25600 outbound messages. sendBuffered chan string @@ -161,18 +158,29 @@ func (p *serport) reader(buftype string) { // Keep track of time difference between two consecutive read with n == 0 and err == nil // we get here if the port has been disconnected while open (cpu usage will jump to 100%) // let's close the port only if the events are extremely fast (<1ms) - if err == nil { - diff := time.Since(timeCheckOpen) - if diff.Nanoseconds() < 1000000 { - p.isClosingDueToError = true - break - } - timeCheckOpen = time.Now() + diff := time.Since(timeCheckOpen) + if diff.Nanoseconds() < 1000000 { + p.isClosingDueToError = true + break } + timeCheckOpen = time.Now() } } if p.isClosingDueToError { - spCloseReal(p) + p.Close() + } +} + +// Write data to the serial port. +func (p *serport) Write(data string, sendMode string) { + // if user sent in the commands as one text mode line + switch sendMode { + case "send": + p.sendBuffered <- data + case "sendnobuf": + p.sendNoBuf <- []byte(data) + case "sendraw": + p.sendRaw <- data } } @@ -213,10 +221,6 @@ func (p *serport) writerNoBuf() { // if we get here, we were able to write successfully // to the serial port because it blocks until it can write - // decrement counter - p.itemsInBuffer-- - log.Printf("itemsInBuffer:%v\n", p.itemsInBuffer) - // FINALLY, OF ALL THE CODE IN THIS PROJECT // WE TRULY/FINALLY GET TO WRITE TO THE SERIAL PORT! n2, err := p.portIo.Write(data) @@ -343,13 +347,8 @@ func spHandlerOpen(portname string, baud int, buftype string) { serialPorts.List() } -func spHandlerClose(p *serport) { +func (p *serport) Close() { p.isClosing = true - h.broadcastSys <- []byte("Closing serial port " + p.portConf.Name) - spCloseReal(p) -} - -func spCloseReal(p *serport) { p.bufferwatcher.Close() p.portIo.Close() serialPorts.MarkPortAsClosed(p.portName) From d9135cd39bd3828c3b4ce3464e7e2d6a13adf5d8 Mon Sep 17 00:00:00 2001 From: Alby <30591904+Xayton@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:47:07 +0200 Subject: [PATCH 06/51] Improve the "Debug Console" to add functionality and fix bugs (#944) * Update the home.html file that powers the "Debug Console": - Improved the CSS code and JS code - Added the support for the "show 'list'" options as a select - Add an additional section to show only the "list" commands, when the user selects such option - Fixed the code detecting "list" messages, as it was missing cases where the JSON content had a "Ports" property but its value was null instead of an empty array. * The Debug Console is now jQuery-free. - The code has been restructured to be simpler and avoid global variable as much as possible. --- home.html | 503 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 294 insertions(+), 209 deletions(-) diff --git a/home.html b/home.html index 30c241f22..e66b7c975 100644 --- a/home.html +++ b/home.html @@ -1,236 +1,321 @@ + -Arduino Create Agent Debug Console - - - - - + + - + function exportLogs() { + const link = document.createElement('a'); + link.setAttribute('download', 'agent-log.txt'); + const text = document.getElementById('log').textContent; + link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + link.click(); + } + + - -
+ + +
+

-            
+
+
+
\ No newline at end of file

From 01c2e3e9003f7543cc732f322dbdc6d45cb19918 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 2 May 2024 11:54:52 +0200
Subject: [PATCH 07/51] Bump golang.org/x/sys from 0.18.0 to 0.19.0 (#934)

* Bump golang.org/x/sys from 0.18.0 to 0.19.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/sys/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 

* update licenses

---------

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Umberto Baldi 
---
 .../arduino-create-agent/go/golang.org/x/sys/unix.dep.yml   | 6 +++---
 go.mod                                                      | 2 +-
 go.sum                                                      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
index 923a8975f..9e39a68f6 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/sys/unix
-version: v0.18.0
+version: v0.19.0
 type: go
 summary: Package unix contains an interface to the low-level operating system primitives.
 homepage: https://pkg.go.dev/golang.org/x/sys/unix
 license: bsd-3-clause
 licenses:
-- sources: sys@v0.18.0/LICENSE
+- sources: sys@v0.19.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: sys@v0.18.0/PATENTS
+- sources: sys@v0.19.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/go.mod b/go.mod
index cae29b64f..4e3b29fbd 100644
--- a/go.mod
+++ b/go.mod
@@ -23,7 +23,7 @@ require (
 	github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9
 	go.bug.st/serial v1.6.1
 	goa.design/goa/v3 v3.15.2
-	golang.org/x/sys v0.18.0
+	golang.org/x/sys v0.19.0
 	gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa
 )
 
diff --git a/go.sum b/go.sum
index c10f8d734..99d5ebb86 100644
--- a/go.sum
+++ b/go.sum
@@ -184,8 +184,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
-golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
+golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=

From e78d61888a6b5fd6ab2dd6cdfd6161328d5ffcc7 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 2 May 2024 12:14:18 +0200
Subject: [PATCH 08/51] Bump goa.design/goa/v3 from 3.15.2 to 3.16.1 (#937)

* Bump goa.design/goa/v3 from 3.15.2 to 3.16.1

Bumps goa.design/goa/v3 from 3.15.2 to 3.16.1.

---
updated-dependencies:
- dependency-name: goa.design/goa/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 

* update licenses

* run `goa gen github.com/arduino/arduino-create-agent/design`

---------

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Umberto Baldi 
---
 .../go/goa.design/goa/v3/http.dep.yml         |  4 ++--
 .../goa.design/goa/v3/http/middleware.dep.yml |  4 ++--
 .../go/goa.design/goa/v3/middleware.dep.yml   |  4 ++--
 .../go/goa.design/goa/v3/pkg.dep.yml          |  4 ++--
 .../go/golang.org/x/crypto/argon2.dep.yml     |  6 ++---
 .../go/golang.org/x/crypto/blake2b.dep.yml    |  6 ++---
 .../go/golang.org/x/crypto/cast5.dep.yml      |  6 ++---
 .../go/golang.org/x/crypto/sha3.dep.yml       |  6 ++---
 .../go/golang.org/x/net/html.dep.yml          |  6 ++---
 .../go/golang.org/x/net/html/atom.dep.yml     |  6 ++---
 .../go/golang.org/x/net/http2.dep.yml         |  6 ++---
 .../go/golang.org/x/net/http2/h2c.dep.yml     |  6 ++---
 .../golang.org/x/net/internal/socks.dep.yml   |  6 ++---
 .../go/golang.org/x/net/proxy.dep.yml         |  6 ++---
 gen/http/cli/arduino_create_agent/cli.go      |  2 +-
 gen/http/tools/client/cli.go                  |  2 +-
 gen/http/tools/client/client.go               |  2 +-
 gen/http/tools/client/encode_decode.go        |  2 +-
 gen/http/tools/client/paths.go                |  2 +-
 gen/http/tools/client/types.go                |  2 +-
 gen/http/tools/server/encode_decode.go        |  2 +-
 gen/http/tools/server/paths.go                |  2 +-
 gen/http/tools/server/server.go               |  2 +-
 gen/http/tools/server/types.go                |  2 +-
 gen/tools/client.go                           |  2 +-
 gen/tools/endpoints.go                        |  2 +-
 gen/tools/service.go                          |  2 +-
 gen/tools/views/view.go                       |  2 +-
 go.mod                                        | 11 +++++----
 go.sum                                        | 24 +++++++++----------
 30 files changed, 70 insertions(+), 69 deletions(-)

diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml
index e5895ae5b..5b8731876 100644
--- a/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml
+++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: goa.design/goa/v3/http
-version: v3.15.2
+version: v3.16.1
 type: go
 summary: Package http contains HTTP specific constructs that complement the code generated
   by Goa.
 homepage: https://pkg.go.dev/goa.design/goa/v3/http
 license: mit
 licenses:
-- sources: v3@v3.15.2/LICENSE
+- sources: v3@v3.16.1/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml
index 38592f929..193108077 100644
--- a/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml
+++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: goa.design/goa/v3/http/middleware
-version: v3.15.2
+version: v3.16.1
 type: go
 summary: Package middleware contains HTTP middlewares that wrap a HTTP handler to
   provide ancilliary functionality such as capturing HTTP details into the request
@@ -8,7 +8,7 @@ summary: Package middleware contains HTTP middlewares that wrap a HTTP handler t
 homepage: https://pkg.go.dev/goa.design/goa/v3/http/middleware
 license: mit
 licenses:
-- sources: v3@v3.15.2/LICENSE
+- sources: v3@v3.16.1/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml
index dadcb49d3..f84516f4f 100644
--- a/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml
+++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: goa.design/goa/v3/middleware
-version: v3.15.2
+version: v3.16.1
 type: go
 summary: Package middleware contains transport independent middlewares.
 homepage: https://pkg.go.dev/goa.design/goa/v3/middleware
 license: mit
 licenses:
-- sources: v3@v3.15.2/LICENSE
+- sources: v3@v3.16.1/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml
index c6366883f..fc7a78b9d 100644
--- a/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml
+++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: goa.design/goa/v3/pkg
-version: v3.15.2
+version: v3.16.1
 type: go
 summary: Package goa implements a Go framework for writing microservices that promotes
   best practice by providing a single source of truth from which server code, client
@@ -8,7 +8,7 @@ summary: Package goa implements a Go framework for writing microservices that pr
 homepage: https://pkg.go.dev/goa.design/goa/v3/pkg
 license: mit
 licenses:
-- sources: v3@v3.15.2/LICENSE
+- sources: v3@v3.16.1/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
index d1d74d423..0829f6347 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/crypto/argon2
-version: v0.21.0
+version: v0.22.0
 type: go
 summary: Package argon2 implements the key derivation function Argon2.
 homepage: https://pkg.go.dev/golang.org/x/crypto/argon2
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.21.0/LICENSE
+- sources: crypto@v0.22.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.21.0/PATENTS
+- sources: crypto@v0.22.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
index 6ab357baf..6d6d92d28 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/crypto/blake2b
-version: v0.21.0
+version: v0.22.0
 type: go
 summary: Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693
   and the extendable output function (XOF) BLAKE2Xb.
 homepage: https://pkg.go.dev/golang.org/x/crypto/blake2b
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.21.0/LICENSE
+- sources: crypto@v0.22.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.21.0/PATENTS
+- sources: crypto@v0.22.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
index 04ad057a3..fa791187f 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/crypto/cast5
-version: v0.21.0
+version: v0.22.0
 type: go
 summary: Package cast5 implements CAST5, as defined in RFC 2144.
 homepage: https://pkg.go.dev/golang.org/x/crypto/cast5
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.21.0/LICENSE
+- sources: crypto@v0.22.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.21.0/PATENTS
+- sources: crypto@v0.22.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
index 45a62ab94..b8a9b9c4b 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/crypto/sha3
-version: v0.21.0
+version: v0.22.0
 type: go
 summary: Package sha3 implements the SHA-3 fixed-output-length hash functions and
   the SHAKE variable-output-length hash functions defined by FIPS-202.
 homepage: https://pkg.go.dev/golang.org/x/crypto/sha3
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.21.0/LICENSE
+- sources: crypto@v0.22.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.21.0/PATENTS
+- sources: crypto@v0.22.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
index 058ba18b2..26dfe21d6 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/html
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: Package html implements an HTML5-compliant tokenizer and parser.
 homepage: https://pkg.go.dev/golang.org/x/net/html
 license: other
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
index dcac31fa0..f929ee976 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: golang.org/x/net/html/atom
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: 'Package atom provides integer codes (also known as atoms) for a fixed set
   of frequently occurring HTML strings: tag names and attribute keys such as "p" and
@@ -8,7 +8,7 @@ summary: 'Package atom provides integer codes (also known as atoms) for a fixed
 homepage: https://pkg.go.dev/golang.org/x/net/html/atom
 license: other
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -37,7 +37,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
index b4fbb5f5f..0bc41da62 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/http2
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: Package http2 implements the HTTP/2 protocol.
 homepage: https://pkg.go.dev/golang.org/x/net/http2
 license: bsd-3-clause
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
index ae2032104..c80f2b839 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/http2/h2c
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: Package h2c implements the unencrypted "h2c" form of HTTP/2.
 homepage: https://pkg.go.dev/golang.org/x/net/http2/h2c
 license: bsd-3-clause
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
index 74501f355..58a7adef8 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/internal/socks
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: Package socks provides a SOCKS version 5 client implementation.
 homepage: https://pkg.go.dev/golang.org/x/net/internal/socks
 license: other
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
index 7204f88c7..702446e6b 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/net/proxy
-version: v0.22.0
+version: v0.24.0
 type: go
 summary: Package proxy provides support for a variety of protocols to proxy network
   data.
 homepage: https://pkg.go.dev/golang.org/x/net/proxy
 license: other
 licenses:
-- sources: net@v0.22.0/LICENSE
+- sources: net@v0.24.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.22.0/PATENTS
+- sources: net@v0.24.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/gen/http/cli/arduino_create_agent/cli.go b/gen/http/cli/arduino_create_agent/cli.go
index f7f301769..a4d856292 100644
--- a/gen/http/cli/arduino_create_agent/cli.go
+++ b/gen/http/cli/arduino_create_agent/cli.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // arduino-create-agent HTTP client CLI support package
 //
diff --git a/gen/http/tools/client/cli.go b/gen/http/tools/client/cli.go
index 2e502af92..0f02f74bd 100644
--- a/gen/http/tools/client/cli.go
+++ b/gen/http/tools/client/cli.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP client CLI support package
 //
diff --git a/gen/http/tools/client/client.go b/gen/http/tools/client/client.go
index 3ada9a97d..70e5ec54b 100644
--- a/gen/http/tools/client/client.go
+++ b/gen/http/tools/client/client.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools client HTTP transport
 //
diff --git a/gen/http/tools/client/encode_decode.go b/gen/http/tools/client/encode_decode.go
index 4e887370e..b39e94bbe 100644
--- a/gen/http/tools/client/encode_decode.go
+++ b/gen/http/tools/client/encode_decode.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP client encoders and decoders
 //
diff --git a/gen/http/tools/client/paths.go b/gen/http/tools/client/paths.go
index a4e8e0f20..b6f7666d5 100644
--- a/gen/http/tools/client/paths.go
+++ b/gen/http/tools/client/paths.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // HTTP request path constructors for the tools service.
 //
diff --git a/gen/http/tools/client/types.go b/gen/http/tools/client/types.go
index 47fe921d2..ed091792b 100644
--- a/gen/http/tools/client/types.go
+++ b/gen/http/tools/client/types.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP client types
 //
diff --git a/gen/http/tools/server/encode_decode.go b/gen/http/tools/server/encode_decode.go
index d8df0910c..c1ab298ca 100644
--- a/gen/http/tools/server/encode_decode.go
+++ b/gen/http/tools/server/encode_decode.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP server encoders and decoders
 //
diff --git a/gen/http/tools/server/paths.go b/gen/http/tools/server/paths.go
index 01a007cae..f071aff60 100644
--- a/gen/http/tools/server/paths.go
+++ b/gen/http/tools/server/paths.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // HTTP request path constructors for the tools service.
 //
diff --git a/gen/http/tools/server/server.go b/gen/http/tools/server/server.go
index fad105afd..ad339e3de 100644
--- a/gen/http/tools/server/server.go
+++ b/gen/http/tools/server/server.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP server
 //
diff --git a/gen/http/tools/server/types.go b/gen/http/tools/server/types.go
index aa3091679..72bacd4e9 100644
--- a/gen/http/tools/server/types.go
+++ b/gen/http/tools/server/types.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools HTTP server types
 //
diff --git a/gen/tools/client.go b/gen/tools/client.go
index 59f85886a..54ee57cb3 100644
--- a/gen/tools/client.go
+++ b/gen/tools/client.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools client
 //
diff --git a/gen/tools/endpoints.go b/gen/tools/endpoints.go
index 02507a819..de609c5f9 100644
--- a/gen/tools/endpoints.go
+++ b/gen/tools/endpoints.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools endpoints
 //
diff --git a/gen/tools/service.go b/gen/tools/service.go
index 028cb5129..94440d66e 100644
--- a/gen/tools/service.go
+++ b/gen/tools/service.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools service
 //
diff --git a/gen/tools/views/view.go b/gen/tools/views/view.go
index c1dcaaa7e..272e2449b 100644
--- a/gen/tools/views/view.go
+++ b/gen/tools/views/view.go
@@ -1,4 +1,4 @@
-// Code generated by goa v3.15.2, DO NOT EDIT.
+// Code generated by goa v3.16.1, DO NOT EDIT.
 //
 // tools views
 //
diff --git a/go.mod b/go.mod
index 4e3b29fbd..682a067cc 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
 	github.com/stretchr/testify v1.9.0
 	github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9
 	go.bug.st/serial v1.6.1
-	goa.design/goa/v3 v3.15.2
+	goa.design/goa/v3 v3.16.1
 	golang.org/x/sys v0.19.0
 	gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa
 )
@@ -72,11 +72,12 @@ require (
 	github.com/ugorji/go v1.1.6 // indirect
 	github.com/ulikunitz/xz v0.5.11 // indirect
 	golang.org/x/arch v0.7.0 // indirect
-	golang.org/x/crypto v0.21.0 // indirect
-	golang.org/x/mod v0.16.0 // indirect
-	golang.org/x/net v0.22.0 // indirect
+	golang.org/x/crypto v0.22.0 // indirect
+	golang.org/x/mod v0.17.0 // indirect
+	golang.org/x/net v0.24.0 // indirect
+	golang.org/x/sync v0.7.0 // indirect
 	golang.org/x/text v0.14.0 // indirect
-	golang.org/x/tools v0.19.0 // indirect
+	golang.org/x/tools v0.20.0 // indirect
 	google.golang.org/protobuf v1.33.0 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
diff --git a/go.sum b/go.sum
index 99d5ebb86..8bd2bd284 100644
--- a/go.sum
+++ b/go.sum
@@ -164,21 +164,21 @@ github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6Gj
 github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
 go.bug.st/serial v1.6.1 h1:VSSWmUxlj1T/YlRo2J104Zv3wJFrjHIl/T3NeruWAHY=
 go.bug.st/serial v1.6.1/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
-goa.design/goa/v3 v3.15.2 h1:ziyJuVR+GSBBmQ/Nkr7FDZx9qtEBpRA6wle3hYqJT9Q=
-goa.design/goa/v3 v3.15.2/go.mod h1:zZLxqfk8mZu0Q6fmnnflXYbIJ6BA3SVSB6LSz7Tzcv4=
+goa.design/goa/v3 v3.16.1 h1:yZwbKrfMpE8+sz0uf+n+BtArVOFQ0kNSC0twQKwQb04=
+goa.design/goa/v3 v3.16.1/go.mod h1:Yd42LR0PYDbHSbsbF3vNd4YY/O+LG20Jb7+IyNdkQic=
 golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
 golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc=
 golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
-golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
-golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
-golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
+golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
+golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
-golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
-golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
-golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
+golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
+golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
+golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -190,8 +190,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
-golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
+golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
+golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
 google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
 google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

From 2d6395d6e440dba8a00aebee12ad31032d9db248 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 2 May 2024 12:33:04 +0200
Subject: [PATCH 09/51] Bump github.com/gin-contrib/cors from 1.7.1 to 1.7.2
 (#945)

* Bump github.com/gin-contrib/cors from 1.7.1 to 1.7.2

Bumps [github.com/gin-contrib/cors](https://github.com/gin-contrib/cors) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/gin-contrib/cors/releases)
- [Changelog](https://github.com/gin-contrib/cors/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/cors/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] 

* update licenses

---------

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Umberto Baldi 
---
 .../go/github.com/gin-contrib/cors.dep.yml    |  2 +-
 .../go-playground/validator/v10.dep.yml       |  2 +-
 .../github.com/pelletier/go-toml/v2.dep.yml   |  2 +-
 .../go-toml/v2/internal/characters.dep.yml    |  6 ++--
 .../go-toml/v2/internal/danger.dep.yml        |  6 ++--
 .../go-toml/v2/internal/tracker.dep.yml       |  6 ++--
 .../pelletier/go-toml/v2/unstable.dep.yml     |  6 ++--
 .../protobuf/encoding/protowire.dep.yml       |  6 ++--
 .../protobuf/internal/detrand.dep.yml         |  6 ++--
 .../internal/encoding/messageset.dep.yml      |  6 ++--
 .../protobuf/internal/errors.dep.yml          |  6 ++--
 .../protobuf/internal/flags.dep.yml           |  6 ++--
 .../protobuf/internal/genid.dep.yml           |  6 ++--
 .../protobuf/internal/order.dep.yml           |  6 ++--
 .../protobuf/internal/pragma.dep.yml          |  6 ++--
 .../protobuf/internal/strs.dep.yml            |  6 ++--
 .../google.golang.org/protobuf/proto.dep.yml  |  6 ++--
 .../protobuf/reflect/protoreflect.dep.yml     |  6 ++--
 .../protobuf/reflect/protoregistry.dep.yml    |  6 ++--
 .../protobuf/runtime/protoiface.dep.yml       |  6 ++--
 go.mod                                        | 15 ++++----
 go.sum                                        | 35 +++++++++----------
 22 files changed, 78 insertions(+), 80 deletions(-)

diff --git a/.licenses/arduino-create-agent/go/github.com/gin-contrib/cors.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-contrib/cors.dep.yml
index 17338019c..a24f26880 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-contrib/cors.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-contrib/cors.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: github.com/gin-contrib/cors
-version: v1.7.1
+version: v1.7.2
 type: go
 summary:
 homepage: https://pkg.go.dev/github.com/gin-contrib/cors
diff --git a/.licenses/arduino-create-agent/go/github.com/go-playground/validator/v10.dep.yml b/.licenses/arduino-create-agent/go/github.com/go-playground/validator/v10.dep.yml
index 27ea0223c..59a2acb5e 100644
--- a/.licenses/arduino-create-agent/go/github.com/go-playground/validator/v10.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/go-playground/validator/v10.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: github.com/go-playground/validator/v10
-version: v10.19.0
+version: v10.20.0
 type: go
 summary: Package validator implements value validations for structs and individual
   fields based on tags.
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
index 5606d7166..5ac1d339d 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: github.com/pelletier/go-toml/v2
-version: v2.2.0
+version: v2.2.1
 type: go
 summary: Package toml is a library to read and write TOML documents.
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
index f8d606fcd..43981e2c0 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/characters
-version: v2.2.0
+version: v2.2.1
 type: go
 summary:
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/characters
 license: other
 licenses:
-- sources: v2@v2.2.0/LICENSE
+- sources: v2@v2.2.1/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.0/README.md
+- sources: v2@v2.2.1/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
index 0861b3f27..d176af23c 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/danger
-version: v2.2.0
+version: v2.2.1
 type: go
 summary:
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/danger
 license: other
 licenses:
-- sources: v2@v2.2.0/LICENSE
+- sources: v2@v2.2.1/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.0/README.md
+- sources: v2@v2.2.1/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
index 5f2e85da2..cd81b3796 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/tracker
-version: v2.2.0
+version: v2.2.1
 type: go
 summary:
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/tracker
 license: other
 licenses:
-- sources: v2@v2.2.0/LICENSE
+- sources: v2@v2.2.1/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.0/README.md
+- sources: v2@v2.2.1/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
index db67db5b2..40881d134 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: github.com/pelletier/go-toml/v2/unstable
-version: v2.2.0
+version: v2.2.1
 type: go
 summary: Package unstable provides APIs that do not meet the backward compatibility
   guarantees yet.
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/unstable
 license: other
 licenses:
-- sources: v2@v2.2.0/LICENSE
+- sources: v2@v2.2.1/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -31,6 +31,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.0/README.md
+- sources: v2@v2.2.1/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
index 82d6c4b98..70d4d3973 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/encoding/protowire
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package protowire parses and formats the raw wire encoding.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/encoding/protowire
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
index b840c82c7..7307e0c1a 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/detrand
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package detrand provides deterministically random functionality.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/detrand
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
index 42bdcec62..a8e4900e7 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/encoding/messageset
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package messageset encodes and decodes the obsolete MessageSet wire format.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/encoding/messageset
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
index 4fff88a10..b62dc7dbf 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/errors
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package errors implements functions to manipulate errors.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/errors
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
index 415889a9e..b81d78ddf 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/flags
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package flags provides a set of flags controlled by build tags.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/flags
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
index 7e4239655..f89f5f63f 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/internal/genid
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package genid contains constants for declarations in descriptor.proto and
   the well-known types.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/genid
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
index c334e9736..8bcc0919d 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/order
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package order provides ordered access to messages and maps.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/order
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
index e6c40660d..cbfd53219 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/internal/pragma
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package pragma provides types that can be embedded into a struct to statically
   enforce or prevent certain language properties.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/pragma
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
index 58e0e8827..612070283 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/strs
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package strs provides string manipulation functionality specific to protobuf.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/strs
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
index 4de64e7ec..fa722dbd7 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/proto
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package proto provides functions operating on protocol buffer messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/proto
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
index 4f664cb91..14e516165 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/reflect/protoreflect
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package protoreflect provides interfaces to dynamically manipulate messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
index 7bb57b49d..e10cc774d 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/reflect/protoregistry
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package protoregistry provides data structures to register and lookup protobuf
   descriptor types.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoregistry
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
index 78e9d749e..06f700b41 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/runtime/protoiface
-version: v1.33.0
+version: v1.34.0
 type: go
 summary: Package protoiface contains types referenced or implemented by messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/runtime/protoiface
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.33.0/LICENSE
+- sources: protobuf@v1.34.0/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.33.0/PATENTS
+- sources: protobuf@v1.34.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/go.mod b/go.mod
index 682a067cc..98f31a0f3 100644
--- a/go.mod
+++ b/go.mod
@@ -10,7 +10,7 @@ require (
 	github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0
 	github.com/blang/semver v3.5.1+incompatible
 	github.com/codeclysm/extract/v3 v3.1.1
-	github.com/gin-contrib/cors v1.7.1
+	github.com/gin-contrib/cors v1.7.2
 	github.com/gin-gonic/gin v1.9.1
 	github.com/go-ini/ini v1.62.0
 	github.com/googollee/go-socket.io v0.0.0-20181101151912-c8aeb1ed9b49
@@ -30,10 +30,11 @@ require (
 require (
 	github.com/AnatolyRugalev/goregen v0.1.0 // indirect
 	github.com/arduino/go-properties-orderedmap v1.8.0 // indirect
-	github.com/bytedance/sonic v1.11.3 // indirect
-	github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
-	github.com/chenzhuoyu/iasm v0.9.1 // indirect
+	github.com/bytedance/sonic v1.11.6 // indirect
+	github.com/bytedance/sonic/loader v0.1.1 // indirect
 	github.com/cloudflare/circl v1.3.7 // indirect
+	github.com/cloudwego/base64x v0.1.4 // indirect
+	github.com/cloudwego/iasm v0.2.0 // indirect
 	github.com/creack/goselect v0.1.2 // indirect
 	github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
 	github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect
@@ -42,7 +43,7 @@ require (
 	github.com/go-chi/chi/v5 v5.0.12 // indirect
 	github.com/go-playground/locales v0.14.1 // indirect
 	github.com/go-playground/universal-translator v0.18.1 // indirect
-	github.com/go-playground/validator/v10 v10.19.0 // indirect
+	github.com/go-playground/validator/v10 v10.20.0 // indirect
 	github.com/goccy/go-json v0.10.2 // indirect
 	github.com/godbus/dbus/v5 v5.0.4 // indirect
 	github.com/google/go-cmp v0.5.9 // indirect
@@ -62,7 +63,7 @@ require (
 	github.com/mattn/go-isatty v0.0.20 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
-	github.com/pelletier/go-toml/v2 v2.2.0 // indirect
+	github.com/pelletier/go-toml/v2 v2.2.1 // indirect
 	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
 	github.com/rogpeppe/go-internal v1.12.0 // indirect
 	github.com/sergi/go-diff v1.3.1 // indirect
@@ -78,7 +79,7 @@ require (
 	golang.org/x/sync v0.7.0 // indirect
 	golang.org/x/text v0.14.0 // indirect
 	golang.org/x/tools v0.20.0 // indirect
-	google.golang.org/protobuf v1.33.0 // indirect
+	google.golang.org/protobuf v1.34.0 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 8bd2bd284..0af64eff0 100644
--- a/go.sum
+++ b/go.sum
@@ -15,19 +15,16 @@ github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 h1:v7og6Lpskew
 github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0/go.mod h1:1dgblsmK2iBx3L5iNTyRIokeaxbTLUrYiUbHBK6yC3Y=
 github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
 github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
-github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
-github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
-github.com/bytedance/sonic v1.11.3 h1:jRN+yEjakWh8aK5FzrciUHG8OFXK+4/KrAX/ysEtHAA=
-github.com/bytedance/sonic v1.11.3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
-github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
-github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
-github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
-github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
-github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
-github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0=
-github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
+github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
+github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
+github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
 github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
 github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
+github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
+github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
+github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
+github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
 github.com/codeclysm/extract/v3 v3.1.1 h1:iHZtdEAwSTqPrd+1n4jfhr1qBhUWtHlMTjT90+fJVXg=
 github.com/codeclysm/extract/v3 v3.1.1/go.mod h1:ZJi80UG2JtfHqJI+lgJSCACttZi++dHxfWuPaMhlOfQ=
 github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0=
@@ -41,8 +38,8 @@ github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZs
 github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI=
 github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
 github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
-github.com/gin-contrib/cors v1.7.1 h1:s9SIppU/rk8enVvkzwiC2VK3UZ/0NNGsWfUKvV55rqs=
-github.com/gin-contrib/cors v1.7.1/go.mod h1:n/Zj7B4xyrgk/cX1WCX2dkzFfaNm/xJb6oIUk7WTtps=
+github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw=
+github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
 github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
 github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
 github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
@@ -57,8 +54,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
 github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
 github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
 github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4=
-github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
+github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
+github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
 github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
 github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
 github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
@@ -118,8 +115,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo=
-github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
+github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
+github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
 github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -192,8 +189,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
 golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
-google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
-google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
+google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

From 6cbc955fba968519cdfdc756b5a6a19b744a91cf Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 8 May 2024 14:41:49 +0200
Subject: [PATCH 10/51] Bump golang.org/x/sys from 0.19.0 to 0.20.0 (#947)

* Bump golang.org/x/sys from 0.19.0 to 0.20.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/sys/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 

* Update licenses

---------

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MatteoPologruto 
---
 .../arduino-create-agent/go/golang.org/x/sys/unix.dep.yml   | 6 +++---
 go.mod                                                      | 2 +-
 go.sum                                                      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
index 9e39a68f6..8c6dd955b 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/sys/unix
-version: v0.19.0
+version: v0.20.0
 type: go
 summary: Package unix contains an interface to the low-level operating system primitives.
 homepage: https://pkg.go.dev/golang.org/x/sys/unix
 license: bsd-3-clause
 licenses:
-- sources: sys@v0.19.0/LICENSE
+- sources: sys@v0.20.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: sys@v0.19.0/PATENTS
+- sources: sys@v0.20.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/go.mod b/go.mod
index 98f31a0f3..52ce382b7 100644
--- a/go.mod
+++ b/go.mod
@@ -23,7 +23,7 @@ require (
 	github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9
 	go.bug.st/serial v1.6.1
 	goa.design/goa/v3 v3.16.1
-	golang.org/x/sys v0.19.0
+	golang.org/x/sys v0.20.0
 	gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa
 )
 
diff --git a/go.sum b/go.sum
index 0af64eff0..18a9e17a2 100644
--- a/go.sum
+++ b/go.sum
@@ -181,8 +181,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
-golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=

From bf5b8e4bfadd5902180f64a1ebdaf577e57f4c25 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 8 May 2024 15:29:58 +0200
Subject: [PATCH 11/51] Bump github.com/gin-gonic/gin from 1.9.1 to 1.10.0
 (#948)

* Bump github.com/gin-gonic/gin from 1.9.1 to 1.10.0

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.9.1...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] 

* Update licenses

---------

Signed-off-by: dependabot[bot] 
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MatteoPologruto 
---
 .../go/github.com/gin-gonic/gin.dep.yml       |  2 +-
 .../github.com/gin-gonic/gin/binding.dep.yml  |  6 ++--
 .../gin-gonic/gin/internal/bytesconv.dep.yml  |  6 ++--
 .../gin-gonic/gin/internal/json.dep.yml       |  6 ++--
 .../github.com/gin-gonic/gin/render.dep.yml   |  6 ++--
 .../github.com/pelletier/go-toml/v2.dep.yml   |  2 +-
 .../go-toml/v2/internal/characters.dep.yml    |  8 +++---
 .../go-toml/v2/internal/danger.dep.yml        |  8 +++---
 .../go-toml/v2/internal/tracker.dep.yml       |  8 +++---
 .../pelletier/go-toml/v2/unstable.dep.yml     |  6 ++--
 .../go/golang.org/x/crypto/argon2.dep.yml     |  6 ++--
 .../go/golang.org/x/crypto/blake2b.dep.yml    |  6 ++--
 .../go/golang.org/x/crypto/cast5.dep.yml      |  6 ++--
 .../go/golang.org/x/crypto/sha3.dep.yml       |  6 ++--
 .../go/golang.org/x/net/html.dep.yml          |  6 ++--
 .../go/golang.org/x/net/html/atom.dep.yml     |  6 ++--
 .../go/golang.org/x/net/http2.dep.yml         |  6 ++--
 .../go/golang.org/x/net/http2/h2c.dep.yml     |  6 ++--
 .../golang.org/x/net/internal/socks.dep.yml   |  6 ++--
 .../go/golang.org/x/net/proxy.dep.yml         |  6 ++--
 .../x/text/internal/language.dep.yml          |  8 +++---
 .../x/text/internal/language/compact.dep.yml  |  6 ++--
 .../go/golang.org/x/text/internal/tag.dep.yml |  6 ++--
 .../go/golang.org/x/text/language.dep.yml     |  6 ++--
 .../protobuf/encoding/protowire.dep.yml       |  6 ++--
 .../protobuf/internal/detrand.dep.yml         |  6 ++--
 .../internal/encoding/messageset.dep.yml      |  6 ++--
 .../protobuf/internal/errors.dep.yml          |  6 ++--
 .../protobuf/internal/flags.dep.yml           |  6 ++--
 .../protobuf/internal/genid.dep.yml           |  6 ++--
 .../protobuf/internal/order.dep.yml           |  6 ++--
 .../protobuf/internal/pragma.dep.yml          |  6 ++--
 .../protobuf/internal/strs.dep.yml            |  6 ++--
 .../google.golang.org/protobuf/proto.dep.yml  |  6 ++--
 .../protobuf/reflect/protoreflect.dep.yml     |  6 ++--
 .../protobuf/reflect/protoregistry.dep.yml    |  6 ++--
 .../protobuf/runtime/protoiface.dep.yml       |  6 ++--
 go.mod                                        | 14 +++++-----
 go.sum                                        | 28 +++++++++----------
 39 files changed, 132 insertions(+), 132 deletions(-)

diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin.dep.yml
index 00b9d694f..7d4960e69 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: github.com/gin-gonic/gin
-version: v1.9.1
+version: v1.10.0
 type: go
 summary: Package gin implements a HTTP web framework called gin.
 homepage: https://pkg.go.dev/github.com/gin-gonic/gin
diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml
index 00c113b44..6801615fa 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/gin-gonic/gin/binding
-version: v1.9.1
+version: v1.10.0
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/gin-gonic/gin/binding
 license: mit
 licenses:
-- sources: gin@v1.9.1/LICENSE
+- sources: gin@v1.10.0/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml
index 351014520..c9d7afd9a 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/gin-gonic/gin/internal/bytesconv
-version: v1.9.1
+version: v1.10.0
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/gin-gonic/gin/internal/bytesconv
 license: mit
 licenses:
-- sources: gin@v1.9.1/LICENSE
+- sources: gin@v1.10.0/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml
index 22d75578c..57739599b 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/gin-gonic/gin/internal/json
-version: v1.9.1
+version: v1.10.0
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/gin-gonic/gin/internal/json
 license: mit
 licenses:
-- sources: gin@v1.9.1/LICENSE
+- sources: gin@v1.10.0/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml
index 3ad37b2e2..5b0dc5bbb 100644
--- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/gin-gonic/gin/render
-version: v1.9.1
+version: v1.10.0
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/gin-gonic/gin/render
 license: mit
 licenses:
-- sources: gin@v1.9.1/LICENSE
+- sources: gin@v1.10.0/LICENSE
   text: |
     The MIT License (MIT)
 
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
index 5ac1d339d..44cb14185 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: github.com/pelletier/go-toml/v2
-version: v2.2.1
+version: v2.2.2
 type: go
 summary: Package toml is a library to read and write TOML documents.
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
index 43981e2c0..afddf80f5 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/characters
-version: v2.2.1
+version: v2.2.2
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/characters
 license: other
 licenses:
-- sources: v2@v2.2.1/LICENSE
+- sources: v2@v2.2.2/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.1/README.md
+- sources: v2@v2.2.2/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
index d176af23c..5fe64d014 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/danger
-version: v2.2.1
+version: v2.2.2
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/danger
 license: other
 licenses:
-- sources: v2@v2.2.1/LICENSE
+- sources: v2@v2.2.2/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.1/README.md
+- sources: v2@v2.2.2/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
index cd81b3796..6b73e51e6 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: github.com/pelletier/go-toml/v2/internal/tracker
-version: v2.2.1
+version: v2.2.2
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/tracker
 license: other
 licenses:
-- sources: v2@v2.2.1/LICENSE
+- sources: v2@v2.2.2/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -30,6 +30,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.1/README.md
+- sources: v2@v2.2.2/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
index 40881d134..4fc5a61cb 100644
--- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
+++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/unstable.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: github.com/pelletier/go-toml/v2/unstable
-version: v2.2.1
+version: v2.2.2
 type: go
 summary: Package unstable provides APIs that do not meet the backward compatibility
   guarantees yet.
 homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/unstable
 license: other
 licenses:
-- sources: v2@v2.2.1/LICENSE
+- sources: v2@v2.2.2/LICENSE
   text: |
     The MIT License (MIT)
 
@@ -31,6 +31,6 @@ licenses:
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-- sources: v2@v2.2.1/README.md
+- sources: v2@v2.2.2/README.md
   text: The MIT License (MIT). Read [LICENSE](LICENSE).
 notices: []
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
index 0829f6347..cc73f399f 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/argon2.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/crypto/argon2
-version: v0.22.0
+version: v0.23.0
 type: go
 summary: Package argon2 implements the key derivation function Argon2.
 homepage: https://pkg.go.dev/golang.org/x/crypto/argon2
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.22.0/LICENSE
+- sources: crypto@v0.23.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.22.0/PATENTS
+- sources: crypto@v0.23.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
index 6d6d92d28..ef8816c59 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blake2b.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/crypto/blake2b
-version: v0.22.0
+version: v0.23.0
 type: go
 summary: Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693
   and the extendable output function (XOF) BLAKE2Xb.
 homepage: https://pkg.go.dev/golang.org/x/crypto/blake2b
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.22.0/LICENSE
+- sources: crypto@v0.23.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.22.0/PATENTS
+- sources: crypto@v0.23.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
index fa791187f..369aae2e1 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/crypto/cast5
-version: v0.22.0
+version: v0.23.0
 type: go
 summary: Package cast5 implements CAST5, as defined in RFC 2144.
 homepage: https://pkg.go.dev/golang.org/x/crypto/cast5
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.22.0/LICENSE
+- sources: crypto@v0.23.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.22.0/PATENTS
+- sources: crypto@v0.23.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
index b8a9b9c4b..1ef1c7c9f 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/crypto/sha3
-version: v0.22.0
+version: v0.23.0
 type: go
 summary: Package sha3 implements the SHA-3 fixed-output-length hash functions and
   the SHAKE variable-output-length hash functions defined by FIPS-202.
 homepage: https://pkg.go.dev/golang.org/x/crypto/sha3
 license: bsd-3-clause
 licenses:
-- sources: crypto@v0.22.0/LICENSE
+- sources: crypto@v0.23.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: crypto@v0.22.0/PATENTS
+- sources: crypto@v0.23.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
index 26dfe21d6..be34abd7f 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/html.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/html
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: Package html implements an HTML5-compliant tokenizer and parser.
 homepage: https://pkg.go.dev/golang.org/x/net/html
 license: other
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
index f929ee976..49ddaa0f3 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/html/atom.dep.yml
@@ -1,6 +1,6 @@
 ---
 name: golang.org/x/net/html/atom
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: 'Package atom provides integer codes (also known as atoms) for a fixed set
   of frequently occurring HTML strings: tag names and attribute keys such as "p" and
@@ -8,7 +8,7 @@ summary: 'Package atom provides integer codes (also known as atoms) for a fixed
 homepage: https://pkg.go.dev/golang.org/x/net/html/atom
 license: other
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -37,7 +37,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
index 0bc41da62..4e442b810 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/http2
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: Package http2 implements the HTTP/2 protocol.
 homepage: https://pkg.go.dev/golang.org/x/net/http2
 license: bsd-3-clause
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
index c80f2b839..38586be25 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/http2/h2c
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: Package h2c implements the unencrypted "h2c" form of HTTP/2.
 homepage: https://pkg.go.dev/golang.org/x/net/http2/h2c
 license: bsd-3-clause
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
index 58a7adef8..5e49f37c5 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socks.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/net/internal/socks
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: Package socks provides a SOCKS version 5 client implementation.
 homepage: https://pkg.go.dev/golang.org/x/net/internal/socks
 license: other
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
index 702446e6b..a87c7e359 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/net/proxy.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: golang.org/x/net/proxy
-version: v0.24.0
+version: v0.25.0
 type: go
 summary: Package proxy provides support for a variety of protocols to proxy network
   data.
 homepage: https://pkg.go.dev/golang.org/x/net/proxy
 license: other
 licenses:
-- sources: net@v0.24.0/LICENSE
+- sources: net@v0.25.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: net@v0.24.0/PATENTS
+- sources: net@v0.25.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml
index 42b866d40..988bad3c9 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/text/internal/language
-version: v0.14.0
+version: v0.15.0
 type: go
-summary:
+summary: 
 homepage: https://pkg.go.dev/golang.org/x/text/internal/language
 license: bsd-3-clause
 licenses:
-- sources: text@v0.14.0/LICENSE
+- sources: text@v0.15.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: text@v0.14.0/PATENTS
+- sources: text@v0.15.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml
index 8c839abc4..d6e0022d2 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/text/internal/language/compact
-version: v0.14.0
+version: v0.15.0
 type: go
 summary: Package compact defines a compact representation of language tags.
 homepage: https://pkg.go.dev/golang.org/x/text/internal/language/compact
 license: bsd-3-clause
 licenses:
-- sources: text@v0.14.0/LICENSE
+- sources: text@v0.15.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: text@v0.14.0/PATENTS
+- sources: text@v0.15.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml
index ee82cf388..f5b00b4eb 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/text/internal/tag
-version: v0.14.0
+version: v0.15.0
 type: go
 summary: Package tag contains functionality handling tags and related data.
 homepage: https://pkg.go.dev/golang.org/x/text/internal/tag
 license: bsd-3-clause
 licenses:
-- sources: text@v0.14.0/LICENSE
+- sources: text@v0.15.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: text@v0.14.0/PATENTS
+- sources: text@v0.15.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml
index 31167ba6c..ee9e1f0d0 100644
--- a/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml
+++ b/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: golang.org/x/text/language
-version: v0.14.0
+version: v0.15.0
 type: go
 summary: Package language implements BCP 47 language tags and related functionality.
 homepage: https://pkg.go.dev/golang.org/x/text/language
 license: bsd-3-clause
 licenses:
-- sources: text@v0.14.0/LICENSE
+- sources: text@v0.15.0/LICENSE
   text: |
     Copyright (c) 2009 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: text@v0.14.0/PATENTS
+- sources: text@v0.15.0/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
index 70d4d3973..d935d1df6 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/encoding/protowire
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package protowire parses and formats the raw wire encoding.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/encoding/protowire
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
index 7307e0c1a..1b4a97a55 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/detrand
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package detrand provides deterministically random functionality.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/detrand
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
index a8e4900e7..8cf22dded 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/encoding/messageset
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package messageset encodes and decodes the obsolete MessageSet wire format.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/encoding/messageset
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
index b62dc7dbf..ee63cc3d2 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/errors
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package errors implements functions to manipulate errors.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/errors
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
index b81d78ddf..4ad5ad854 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/flags
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package flags provides a set of flags controlled by build tags.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/flags
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
index f89f5f63f..74669222b 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/internal/genid
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package genid contains constants for declarations in descriptor.proto and
   the well-known types.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/genid
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
index 8bcc0919d..43e239a6b 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/order
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package order provides ordered access to messages and maps.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/order
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
index cbfd53219..b8f4d4e96 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/internal/pragma
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package pragma provides types that can be embedded into a struct to statically
   enforce or prevent certain language properties.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/pragma
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
index 612070283..a2137bf66 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/internal/strs
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package strs provides string manipulation functionality specific to protobuf.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/strs
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
index fa722dbd7..bcbae244e 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/proto
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package proto provides functions operating on protocol buffer messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/proto
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
index 14e516165..d38294499 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/reflect/protoreflect
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package protoreflect provides interfaces to dynamically manipulate messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
index e10cc774d..737474192 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml
@@ -1,13 +1,13 @@
 ---
 name: google.golang.org/protobuf/reflect/protoregistry
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package protoregistry provides data structures to register and lookup protobuf
   descriptor types.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoregistry
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -36,7 +36,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
index 06f700b41..559ff53fc 100644
--- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
+++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml
@@ -1,12 +1,12 @@
 ---
 name: google.golang.org/protobuf/runtime/protoiface
-version: v1.34.0
+version: v1.34.1
 type: go
 summary: Package protoiface contains types referenced or implemented by messages.
 homepage: https://pkg.go.dev/google.golang.org/protobuf/runtime/protoiface
 license: bsd-3-clause
 licenses:
-- sources: protobuf@v1.34.0/LICENSE
+- sources: protobuf@v1.34.1/LICENSE
   text: |
     Copyright (c) 2018 The Go Authors. All rights reserved.
 
@@ -35,7 +35,7 @@ licenses:
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: protobuf@v1.34.0/PATENTS
+- sources: protobuf@v1.34.1/PATENTS
   text: |
     Additional IP Rights Grant (Patents)
 
diff --git a/go.mod b/go.mod
index 52ce382b7..b1f0f8fda 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
 	github.com/blang/semver v3.5.1+incompatible
 	github.com/codeclysm/extract/v3 v3.1.1
 	github.com/gin-contrib/cors v1.7.2
-	github.com/gin-gonic/gin v1.9.1
+	github.com/gin-gonic/gin v1.10.0
 	github.com/go-ini/ini v1.62.0
 	github.com/googollee/go-socket.io v0.0.0-20181101151912-c8aeb1ed9b49
 	github.com/mattn/go-shellwords v1.0.12
@@ -63,7 +63,7 @@ require (
 	github.com/mattn/go-isatty v0.0.20 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
-	github.com/pelletier/go-toml/v2 v2.2.1 // indirect
+	github.com/pelletier/go-toml/v2 v2.2.2 // indirect
 	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
 	github.com/rogpeppe/go-internal v1.12.0 // indirect
 	github.com/sergi/go-diff v1.3.1 // indirect
@@ -72,14 +72,14 @@ require (
 	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
 	github.com/ugorji/go v1.1.6 // indirect
 	github.com/ulikunitz/xz v0.5.11 // indirect
-	golang.org/x/arch v0.7.0 // indirect
-	golang.org/x/crypto v0.22.0 // indirect
+	golang.org/x/arch v0.8.0 // indirect
+	golang.org/x/crypto v0.23.0 // indirect
 	golang.org/x/mod v0.17.0 // indirect
-	golang.org/x/net v0.24.0 // indirect
+	golang.org/x/net v0.25.0 // indirect
 	golang.org/x/sync v0.7.0 // indirect
-	golang.org/x/text v0.14.0 // indirect
+	golang.org/x/text v0.15.0 // indirect
 	golang.org/x/tools v0.20.0 // indirect
-	google.golang.org/protobuf v1.34.0 // indirect
+	google.golang.org/protobuf v1.34.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index 18a9e17a2..278446a66 100644
--- a/go.sum
+++ b/go.sum
@@ -42,8 +42,8 @@ github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQ
 github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E=
 github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
 github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
-github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
-github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
+github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
+github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
 github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
 github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
 github.com/go-ini/ini v1.62.0 h1:7VJT/ZXjzqSrvtraFp4ONq80hTcRQth1c9ZnQ3uNQvU=
@@ -115,8 +115,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
-github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
+github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
+github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
 github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -164,16 +164,16 @@ go.bug.st/serial v1.6.1/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE=
 goa.design/goa/v3 v3.16.1 h1:yZwbKrfMpE8+sz0uf+n+BtArVOFQ0kNSC0twQKwQb04=
 goa.design/goa/v3 v3.16.1/go.mod h1:Yd42LR0PYDbHSbsbF3vNd4YY/O+LG20Jb7+IyNdkQic=
 golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
-golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc=
-golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
+golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
+golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
-golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
 golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
 golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
-golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
 golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
 golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -184,13 +184,13 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
 golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
-golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
 golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
-google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
-google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
+google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

From 222a50545708dcce9478cfae10242af434025614 Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Wed, 8 May 2024 15:43:01 +0200
Subject: [PATCH 12/51] Manage the HTTPS certificate from the menu and ask
 Safari users to install it at startup (#941)

* Add function to retrieve certificates expiration date

* Check the certificate expiration date

* Obtain certificates info using the systray icon

* Manage errors that may occur retrieving certificates expiration date

* Obtain default browser name on macOS

* Prompt Safari users to install HTTPS certificates and check if they are outdated when the Agent is started

* Skip some tests on macOS because the user is prompted to install certificates

* Set installCerts value in config.ini if certicates are manually installed

* Always set installCerts if the certificates exist

* Add "Arduino Agent" to the title of dialogs

* Fix check for pressed buttons

* Move osascript execution function to Utilities to avoid code duplication

* Modify certificate management from the systray menu

* Install certificates if they are missing and the flag inside the config is set to true

* Avoid code duplication

* Fix button order and title

* Do not restart the Agent if no action is performed on the certificate

* Do not modify the config if the default browser is not Safari

* Small messages/titles fixes

---------

Co-authored-by: Xayton <30591904+Xayton@users.noreply.github.com>
---
 certificates/certificates.go    | 48 +++++++++++++++++
 certificates/install_darwin.go  | 94 ++++++++++++++++++++++++++++++---
 certificates/install_default.go | 12 +++++
 config/config.go                | 18 +++++++
 main.go                         | 63 +++++++++++++++++++---
 systray/systray_real.go         | 59 +++++++++++++--------
 tests/test_info.py              |  6 +++
 tests/test_v2.py                |  6 +++
 tests/test_ws.py                |  9 ++++
 utilities/utilities.go          |  7 +++
 10 files changed, 285 insertions(+), 37 deletions(-)

diff --git a/certificates/certificates.go b/certificates/certificates.go
index 990fa2e01..baac7c337 100644
--- a/certificates/certificates.go
+++ b/certificates/certificates.go
@@ -30,8 +30,10 @@ import (
 	"math/big"
 	"net"
 	"os"
+	"strings"
 	"time"
 
+	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/arduino/go-paths-helper"
 	log "github.com/sirupsen/logrus"
 )
@@ -267,3 +269,49 @@ func DeleteCertificates(certDir *paths.Path) {
 	certDir.Join("cert.pem").Remove()
 	certDir.Join("cert.cer").Remove()
 }
+
+// isExpired checks if a certificate is expired or about to expire (less than 1 month)
+func isExpired() (bool, error) {
+	bound := time.Now().AddDate(0, 1, 0)
+	dateS, err := GetExpirationDate()
+	if err != nil {
+		return false, err
+	}
+	date, _ := time.Parse(time.DateTime, dateS)
+	return date.Before(bound), nil
+}
+
+// PromptInstallCertsSafari prompts the user to install the HTTPS certificates if they are using Safari
+func PromptInstallCertsSafari() bool {
+	buttonPressed := utilities.UserPrompt("display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nIf you use Safari, you need to install it.\" buttons {\"Do not install\", \"Install the certificate for Safari\"} default button 2 with title \"Arduino Agent: Install certificate\"")
+	return strings.Contains(string(buttonPressed), "button returned:Install the certificate for Safari")
+}
+
+// PromptExpiredCerts prompts the user to update the HTTPS certificates if they are using Safari
+func PromptExpiredCerts(certDir *paths.Path) {
+	if expired, err := isExpired(); err != nil {
+		log.Errorf("cannot check if certificates are expired something went wrong: %s", err)
+	} else if expired {
+		buttonPressed := utilities.UserPrompt("display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nYour certificate is expired or close to expiration. Do you want to update it?\" buttons {\"Do not update\", \"Update the certificate for Safari\"} default button 2 with title \"Arduino Agent: Update certificate\"")
+		if strings.Contains(string(buttonPressed), "button returned:Update the certificate for Safari") {
+			err := UninstallCertificates()
+			if err != nil {
+				log.Errorf("cannot uninstall certificates something went wrong: %s", err)
+			} else {
+				DeleteCertificates(certDir)
+				GenerateAndInstallCertificates(certDir)
+			}
+		}
+	}
+}
+
+// GenerateAndInstallCertificates generates and installs the certificates
+func GenerateAndInstallCertificates(certDir *paths.Path) {
+	GenerateCertificates(certDir)
+	err := InstallCertificate(certDir.Join("ca.cert.cer"))
+	// if something goes wrong during the cert install we remove them, so the user is able to retry
+	if err != nil {
+		log.Errorf("cannot install certificates something went wrong: %s", err)
+		DeleteCertificates(certDir)
+	}
+}
diff --git a/certificates/install_darwin.go b/certificates/install_darwin.go
index 2c84d7dcb..892c390b0 100644
--- a/certificates/install_darwin.go
+++ b/certificates/install_darwin.go
@@ -89,15 +89,77 @@ const char *uninstallCert() {
     }
     return "";
 }
+
+const char *getExpirationDate(char *expirationDate){
+    // Create a key-value dictionary used to query the Keychain and look for the "Arduino" root certificate.
+    NSDictionary *getquery = @{
+                (id)kSecClass:     (id)kSecClassCertificate,
+                (id)kSecAttrLabel: @"Arduino",
+                (id)kSecReturnRef: @YES,
+            };
+
+    OSStatus err = noErr;
+    SecCertificateRef cert = NULL;
+
+    // Use this function to check for errors
+    err = SecItemCopyMatching((CFDictionaryRef)getquery, (CFTypeRef *)&cert);
+
+    if (err != noErr){
+        NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err];
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    // Get data from the certificate. We just need the "invalidity date" property.
+    CFDictionaryRef valuesDict = SecCertificateCopyValues(cert, (__bridge CFArrayRef)@[(__bridge id)kSecOIDInvalidityDate], NULL);
+
+    id expirationDateValue;
+    if(valuesDict){
+        CFDictionaryRef invalidityDateDictionaryRef = CFDictionaryGetValue(valuesDict, kSecOIDInvalidityDate);
+        if(invalidityDateDictionaryRef){
+            CFTypeRef invalidityRef = CFDictionaryGetValue(invalidityDateDictionaryRef, kSecPropertyKeyValue);
+            if(invalidityRef){
+                expirationDateValue = CFBridgingRelease(invalidityRef);
+            }
+        }
+        CFRelease(valuesDict);
+    }
+
+    NSString *outputString = [@"" stringByAppendingFormat:@"%@", expirationDateValue];
+    if([outputString isEqualToString:@""]){
+        NSString *errString = @"Error: the expiration date of the certificate could not be found";
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    // This workaround allows to obtain the expiration date alongside the error message
+    strncpy(expirationDate, [outputString cStringUsingEncoding:[NSString defaultCStringEncoding]], 32);
+    expirationDate[32-1] = 0;
+
+    return "";
+}
+
+const char *getDefaultBrowserName() {
+    NSURL *defaultBrowserURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:[NSURL URLWithString:@"http://"]];
+    if (defaultBrowserURL) {
+        NSBundle *defaultBrowserBundle = [NSBundle bundleWithURL:defaultBrowserURL];
+        NSString *defaultBrowser = [defaultBrowserBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
+
+        return [defaultBrowser cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    return "";
+}
 */
 import "C"
 import (
 	"errors"
-	"os/exec"
+	"strings"
 	"unsafe"
 
 	log "github.com/sirupsen/logrus"
 
+	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/arduino/go-paths-helper"
 )
 
@@ -110,9 +172,8 @@ func InstallCertificate(cert *paths.Path) error {
 	p := C.installCert(ccert)
 	s := C.GoString(p)
 	if len(s) != 0 {
-		oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"")
-		_ = oscmd.Run()
-		_ = UninstallCertificates()
+		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"")
+		UninstallCertificates()
 		return errors.New(s)
 	}
 	return nil
@@ -125,9 +186,30 @@ func UninstallCertificates() error {
 	p := C.uninstallCert()
 	s := C.GoString(p)
 	if len(s) != 0 {
-		oscmd := exec.Command("osascript", "-e", "display dialog \""+s+"\" buttons \"OK\" with title \"Arduino Agent: Error uninstalling certificates\"")
-		_ = oscmd.Run()
+		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error uninstalling certificates\"")
 		return errors.New(s)
 	}
 	return nil
 }
+
+// GetExpirationDate returns the expiration date of a certificate stored in the keychain
+func GetExpirationDate() (string, error) {
+	log.Infof("Retrieving certificate's expiration date")
+	dateString := C.CString("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") // 32 characters string
+	defer C.free(unsafe.Pointer(dateString))
+	p := C.getExpirationDate(dateString)
+	s := C.GoString(p)
+	if len(s) != 0 {
+		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error retrieving expiration date\"")
+		return "", errors.New(s)
+	}
+	date := C.GoString(dateString)
+	return strings.ReplaceAll(date, " +0000", ""), nil
+}
+
+// GetDefaultBrowserName returns the name of the default browser
+func GetDefaultBrowserName() string {
+	log.Infof("Retrieving default browser name")
+	p := C.getDefaultBrowserName()
+	return C.GoString(p)
+}
diff --git a/certificates/install_default.go b/certificates/install_default.go
index 1b7f24bb9..8013c018d 100644
--- a/certificates/install_default.go
+++ b/certificates/install_default.go
@@ -36,3 +36,15 @@ func UninstallCertificates() error {
 	log.Warn("platform not supported for the certificates uninstall")
 	return errors.New("platform not supported for the certificates uninstall")
 }
+
+// GetExpirationDate won't do anything on unsupported Operative Systems
+func GetExpirationDate() (string, error) {
+	log.Warn("platform not supported for retrieving certificates expiration date")
+	return "", errors.New("platform not supported for retrieving certificates expiration date")
+}
+
+// GetDefaultBrowserName won't do anything on unsupported Operative Systems
+func GetDefaultBrowserName() string {
+	log.Warn("platform not supported for retrieving default browser name")
+	return ""
+}
diff --git a/config/config.go b/config/config.go
index 437437e59..69d29eeee 100644
--- a/config/config.go
+++ b/config/config.go
@@ -21,6 +21,7 @@ import (
 	"os"
 
 	"github.com/arduino/go-paths-helper"
+	"github.com/go-ini/ini"
 	log "github.com/sirupsen/logrus"
 )
 
@@ -124,3 +125,20 @@ func GenerateConfig(destDir *paths.Path) *paths.Path {
 	log.Infof("generated config in %s", configPath)
 	return configPath
 }
+
+// SetInstallCertsIni sets installCerts value to true in the config
+func SetInstallCertsIni(filename string, value string) error {
+	cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: false, AllowPythonMultilineValues: true}, filename)
+	if err != nil {
+		return err
+	}
+	_, err = cfg.Section("").NewKey("installCerts", value)
+	if err != nil {
+		return err
+	}
+	err = cfg.SaveTo(filename)
+	if err != nil {
+		return err
+	}
+	return nil
+}
diff --git a/main.go b/main.go
index 45ae5259c..0231548d4 100755
--- a/main.go
+++ b/main.go
@@ -25,7 +25,6 @@ import (
 	"html/template"
 	"io"
 	"os"
-	"os/exec"
 	"regexp"
 	"runtime"
 	"runtime/debug"
@@ -40,6 +39,7 @@ import (
 	"github.com/arduino/arduino-create-agent/systray"
 	"github.com/arduino/arduino-create-agent/tools"
 	"github.com/arduino/arduino-create-agent/updater"
+	"github.com/arduino/arduino-create-agent/utilities"
 	v2 "github.com/arduino/arduino-create-agent/v2"
 	paths "github.com/arduino/go-paths-helper"
 	cors "github.com/gin-contrib/cors"
@@ -86,6 +86,7 @@ var (
 	verbose           = iniConf.Bool("v", true, "show debug logging")
 	crashreport       = iniConf.Bool("crashreport", false, "enable crashreport logging")
 	autostartMacOS    = iniConf.Bool("autostartMacOS", true, "the Arduino Create Agent is able to start automatically after login on macOS (launchd agent)")
+	installCerts      = iniConf.Bool("installCerts", false, "install the HTTPS certificate for Safari and keep it updated")
 )
 
 // the ports filter provided by the user via the -regex flag, if any
@@ -177,7 +178,7 @@ func loop() {
 	// If we are updating manually from 1.2.7 to 1.3.0 we have to uninstall the old agent manually first.
 	// This check will inform the user if he needs to run the uninstall first
 	if runtime.GOOS == "darwin" && oldInstallExists() {
-		printDialog("Old agent installation of the Arduino Create Agent found, please uninstall it before launching the new one")
+		utilities.UserPrompt("display dialog \"Old agent installation of the Arduino Create Agent found, please uninstall it before launching the new one\" buttons \"OK\" with title \"Error\"")
 		os.Exit(0)
 	}
 
@@ -220,6 +221,32 @@ func loop() {
 		configPath = config.GenerateConfig(configDir)
 	}
 
+	// if the default browser is Safari, prompt the user to install HTTPS certificates
+	// and eventually install them
+	if runtime.GOOS == "darwin" && cert.GetDefaultBrowserName() == "Safari" {
+		if exist, err := installCertsKeyExists(configPath.String()); err != nil {
+			log.Panicf("config.ini cannot be parsed: %s", err)
+		} else if !exist {
+			if config.CertsExist() {
+				err = config.SetInstallCertsIni(configPath.String(), "true")
+				if err != nil {
+					log.Panicf("config.ini cannot be parsed: %s", err)
+				}
+			} else if cert.PromptInstallCertsSafari() {
+				err = config.SetInstallCertsIni(configPath.String(), "true")
+				if err != nil {
+					log.Panicf("config.ini cannot be parsed: %s", err)
+				}
+				cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
+			} else {
+				err = config.SetInstallCertsIni(configPath.String(), "false")
+				if err != nil {
+					log.Panicf("config.ini cannot be parsed: %s", err)
+				}
+			}
+		}
+	}
+
 	// Parse the config.ini
 	args, err := parseIni(configPath.String())
 	if err != nil {
@@ -342,6 +369,24 @@ func loop() {
 		}
 	}
 
+	// check if the HTTPS certificates are expired and prompt the user to update them on macOS
+	if runtime.GOOS == "darwin" && cert.GetDefaultBrowserName() == "Safari" {
+		if *installCerts {
+			if config.CertsExist() {
+				cert.PromptExpiredCerts(config.GetCertificatesDir())
+			} else if cert.PromptInstallCertsSafari() {
+				// installing the certificates from scratch at this point should only happen if
+				// something went wrong during previous installation attempts
+				cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
+			} else {
+				err = config.SetInstallCertsIni(configPath.String(), "false")
+				if err != nil {
+					log.Panicf("config.ini cannot be parsed: %s", err)
+				}
+			}
+		}
+	}
+
 	// launch the discoveries for the running system
 	go serialPorts.Run()
 	// launch the hub routine which is the singleton for the websocket server
@@ -457,12 +502,6 @@ func oldInstallExists() bool {
 	return oldAgentPath.Join("ArduinoCreateAgent.app").Exist()
 }
 
-// printDialog will print a GUI error dialog on macos
-func printDialog(dialogText string) {
-	oscmd := exec.Command("osascript", "-e", "display dialog \""+dialogText+"\" buttons \"OK\" with title \"Error\"")
-	_ = oscmd.Run()
-}
-
 func parseIni(filename string) (args []string, err error) {
 	cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: false, AllowPythonMultilineValues: true}, filename)
 	if err != nil {
@@ -487,3 +526,11 @@ func parseIni(filename string) (args []string, err error) {
 
 	return args, nil
 }
+
+func installCertsKeyExists(filename string) (bool, error) {
+	cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: false, AllowPythonMultilineValues: true}, filename)
+	if err != nil {
+		return false, err
+	}
+	return cfg.Section("").HasKey("installCerts"), nil
+}
diff --git a/systray/systray_real.go b/systray/systray_real.go
index 62e52e21d..503373d82 100644
--- a/systray/systray_real.go
+++ b/systray/systray_real.go
@@ -22,11 +22,13 @@ package systray
 import (
 	"os"
 	"runtime"
+	"strings"
 
 	"fyne.io/systray"
 	cert "github.com/arduino/arduino-create-agent/certificates"
 	"github.com/arduino/arduino-create-agent/config"
 	"github.com/arduino/arduino-create-agent/icon"
+	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/go-ini/ini"
 	log "github.com/sirupsen/logrus"
 	"github.com/skratchdot/open-golang/open"
@@ -63,16 +65,11 @@ func (s *Systray) start() {
 	mRmCrashes := systray.AddMenuItem("Remove crash reports", "")
 	s.updateMenuItem(mRmCrashes, config.LogsIsEmpty())
 
-	mGenCerts := systray.AddMenuItem("Generate and Install HTTPS certificates", "HTTPS Certs")
-	mRemoveCerts := systray.AddMenuItem("Remove HTTPS certificates", "")
+	mManageCerts := systray.AddMenuItem("Manage HTTPS certificate", "HTTPS Certs")
 	// On linux/windows chrome/firefox/edge(chromium) the agent works without problems on plain HTTP,
 	// so we disable the menuItem to generate/install the certificates
 	if runtime.GOOS != "darwin" {
-		s.updateMenuItem(mGenCerts, true)
-		s.updateMenuItem(mRemoveCerts, true)
-	} else {
-		s.updateMenuItem(mGenCerts, config.CertsExist())
-		s.updateMenuItem(mRemoveCerts, !config.CertsExist())
+		s.updateMenuItem(mManageCerts, true)
 	}
 
 	// Add pause/quit
@@ -96,25 +93,41 @@ func (s *Systray) start() {
 			case <-mRmCrashes.ClickedCh:
 				RemoveCrashes()
 				s.updateMenuItem(mRmCrashes, config.LogsIsEmpty())
-			case <-mGenCerts.ClickedCh:
+			case <-mManageCerts.ClickedCh:
+				infoMsg := "The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\n\nYour HTTPS certificate status:\n"
+				buttons := "{\"Install the certificate for Safari\", \"OK\"} default button \"OK\""
 				certDir := config.GetCertificatesDir()
-				cert.GenerateCertificates(certDir)
-				err := cert.InstallCertificate(certDir.Join("ca.cert.cer"))
-				// if something goes wrong during the cert install we remove them, so the user is able to retry
-				if err != nil {
-					log.Errorf("cannot install certificates something went wrong: %s", err)
-					cert.DeleteCertificates(certDir)
-				}
-				s.Restart()
-			case <-mRemoveCerts.ClickedCh:
-				err := cert.UninstallCertificates()
-				if err != nil {
-					log.Errorf("cannot uninstall certificates something went wrong: %s", err)
+				if config.CertsExist() {
+					expDate, err := cert.GetExpirationDate()
+					if err != nil {
+						log.Errorf("cannot get certificates expiration date, something went wrong: %s", err)
+					}
+					infoMsg = infoMsg + "- Certificate installed: Yes\n- Certificate trusted: Yes\n- Certificate expiration date: " + expDate
+					buttons = "{\"Uninstall the certificate for Safari\", \"OK\"} default button \"OK\""
 				} else {
-					certDir := config.GetCertificatesDir()
-					cert.DeleteCertificates(certDir)
+					infoMsg = infoMsg + "- Certificate installed: No\n- Certificate trusted: N/A\n- Certificate expiration date: N/A"
+				}
+				pressedButton := utilities.UserPrompt("display dialog \"" + infoMsg + "\" buttons " + buttons + " with title \"Arduino Agent: Manage HTTPS certificate\"")
+				if strings.Contains(pressedButton, "Install certificate for Safari") {
+					cert.GenerateAndInstallCertificates(certDir)
+					err := config.SetInstallCertsIni(s.currentConfigFilePath.String(), "true")
+					if err != nil {
+						log.Errorf("cannot set installCerts value in config.ini: %s", err)
+					}
+					s.Restart()
+				} else if strings.Contains(pressedButton, "Uninstall certificate for Safari") {
+					err := cert.UninstallCertificates()
+					if err != nil {
+						log.Errorf("cannot uninstall certificates something went wrong: %s", err)
+					} else {
+						cert.DeleteCertificates(certDir)
+						err = config.SetInstallCertsIni(s.currentConfigFilePath.String(), "false")
+						if err != nil {
+							log.Errorf("cannot set installCerts value in config.ini: %s", err)
+						}
+					}
+					s.Restart()
 				}
-				s.Restart()
 			case <-mPause.ClickedCh:
 				s.Pause()
 			case <-mQuit.ClickedCh:
diff --git a/tests/test_info.py b/tests/test_info.py
index 6982ca352..efda3bce8 100644
--- a/tests/test_info.py
+++ b/tests/test_info.py
@@ -15,8 +15,14 @@
 
 import re
 import requests
+import pytest
+from sys import platform
 
 
+@pytest.mark.skipif(
+    platform == "darwin",
+    reason="on macOS the user is prompted to install certificates",
+)
 def test_version(base_url, agent):
     
     resp = requests.get(f"{base_url}/info")
diff --git a/tests/test_v2.py b/tests/test_v2.py
index 9a3778027..5fa44034e 100644
--- a/tests/test_v2.py
+++ b/tests/test_v2.py
@@ -14,8 +14,14 @@
 # along with this program.  If not, see .
 
 import requests
+import pytest
+from sys import platform
 
 
+@pytest.mark.skipif(
+    platform == "darwin",
+    reason="on macOS the user is prompted to install certificates",
+)
 def test_get_tools(base_url, agent):
     
     resp = requests.get(f"{base_url}/v2/pkgs/tools/installed")
diff --git a/tests/test_ws.py b/tests/test_ws.py
index c2623da56..b8004649d 100644
--- a/tests/test_ws.py
+++ b/tests/test_ws.py
@@ -17,16 +17,25 @@
 import json
 import base64
 import pytest
+from sys import platform
 
 from common import running_on_ci
 message = []
 
 
+@pytest.mark.skipif(
+    platform == "darwin",
+    reason="on macOS the user is prompted to install certificates",
+)
 def test_ws_connection(socketio):
     print('my sid is', socketio.sid)
     assert socketio.sid is not None
 
 
+@pytest.mark.skipif(
+    platform == "darwin",
+    reason="on macOS the user is prompted to install certificates",
+)
 def test_list(socketio, message):
     socketio.emit('command', 'list')
     time.sleep(.2)
diff --git a/utilities/utilities.go b/utilities/utilities.go
index 4f40aaf73..63f09103e 100644
--- a/utilities/utilities.go
+++ b/utilities/utilities.go
@@ -149,3 +149,10 @@ func VerifyInput(input string, signature string) error {
 	d := h.Sum(nil)
 	return rsa.VerifyPKCS1v15(rsaKey, crypto.SHA256, d, sign)
 }
+
+// UserPrompt executes an osascript and returns the pressed button
+func UserPrompt(dialog string) string {
+	oscmd := exec.Command("osascript", "-e", dialog)
+	pressedButton, _ := oscmd.Output()
+	return string(pressedButton)
+}

From 3190a1a1326bd841454d5fbb7efd7adc2f6d697e Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Mon, 13 May 2024 15:51:29 +0200
Subject: [PATCH 13/51] Fix buttons and improve handling of certificates when
 Safari is not the default browser (#949)

* Fix check on buttons returning the correct message

* Update certificates regardless of the default browser

* Set installCerts when the certificate is installed from previous versions of the Agent regardless of the default browser

* Do not set installCerts to false if the default browser is not Safari

* Do not ask again to update the certificate if the user refuses once

* Fix user script on macOS

* Check for the presence of the certificate in the keychain to determine if it is installed

* Fix getExpirationDate breaking when the certificate is expired

* Fix return value in case of error

* getExpirationDate rewritten to use the correct expiration field.

* Separate osascript default button from the one to press

* Fix leftover buttons

* Small text fixes in the "manage certificate" dialog

* Simplify error management in getExpirationDate

* Fix compiler warnings and move obj-c code into a separate file.

* certInKeychain returns a bool

* Fix building errors caused by objective-c files on Ubuntu and Windows

* Build objective-c files only on Darwin

* Remove -ld_classic library because XCode is not up to date on the CI

---------

Co-authored-by: Xayton <30591904+Xayton@users.noreply.github.com>
---
 certificates/certificates.go       |  34 +-----
 certificates/certificates_darwin.h |   7 ++
 certificates/certificates_darwin.m | 137 +++++++++++++++++++++++
 certificates/install_darwin.go     | 172 +++++------------------------
 certificates/install_default.go    |  11 +-
 main.go                            |  75 ++++++++-----
 systray/systray_real.go            |  50 +++++----
 utilities/utilities.go             |   6 +-
 8 files changed, 264 insertions(+), 228 deletions(-)
 create mode 100644 certificates/certificates_darwin.h
 create mode 100644 certificates/certificates_darwin.m

diff --git a/certificates/certificates.go b/certificates/certificates.go
index baac7c337..8a8c50d86 100644
--- a/certificates/certificates.go
+++ b/certificates/certificates.go
@@ -30,16 +30,13 @@ import (
 	"math/big"
 	"net"
 	"os"
-	"strings"
 	"time"
 
-	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/arduino/go-paths-helper"
 	log "github.com/sirupsen/logrus"
 )
 
 var (
-	host      = "localhost"
 	validFrom = ""
 	validFor  = 365 * 24 * time.Hour * 2 // 2 years
 	rsaBits   = 2048
@@ -270,41 +267,16 @@ func DeleteCertificates(certDir *paths.Path) {
 	certDir.Join("cert.cer").Remove()
 }
 
-// isExpired checks if a certificate is expired or about to expire (less than 1 month)
-func isExpired() (bool, error) {
+// IsExpired checks if a certificate is expired or about to expire (less than 1 month)
+func IsExpired() (bool, error) {
 	bound := time.Now().AddDate(0, 1, 0)
-	dateS, err := GetExpirationDate()
+	date, err := GetExpirationDate()
 	if err != nil {
 		return false, err
 	}
-	date, _ := time.Parse(time.DateTime, dateS)
 	return date.Before(bound), nil
 }
 
-// PromptInstallCertsSafari prompts the user to install the HTTPS certificates if they are using Safari
-func PromptInstallCertsSafari() bool {
-	buttonPressed := utilities.UserPrompt("display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nIf you use Safari, you need to install it.\" buttons {\"Do not install\", \"Install the certificate for Safari\"} default button 2 with title \"Arduino Agent: Install certificate\"")
-	return strings.Contains(string(buttonPressed), "button returned:Install the certificate for Safari")
-}
-
-// PromptExpiredCerts prompts the user to update the HTTPS certificates if they are using Safari
-func PromptExpiredCerts(certDir *paths.Path) {
-	if expired, err := isExpired(); err != nil {
-		log.Errorf("cannot check if certificates are expired something went wrong: %s", err)
-	} else if expired {
-		buttonPressed := utilities.UserPrompt("display dialog \"The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nYour certificate is expired or close to expiration. Do you want to update it?\" buttons {\"Do not update\", \"Update the certificate for Safari\"} default button 2 with title \"Arduino Agent: Update certificate\"")
-		if strings.Contains(string(buttonPressed), "button returned:Update the certificate for Safari") {
-			err := UninstallCertificates()
-			if err != nil {
-				log.Errorf("cannot uninstall certificates something went wrong: %s", err)
-			} else {
-				DeleteCertificates(certDir)
-				GenerateAndInstallCertificates(certDir)
-			}
-		}
-	}
-}
-
 // GenerateAndInstallCertificates generates and installs the certificates
 func GenerateAndInstallCertificates(certDir *paths.Path) {
 	GenerateCertificates(certDir)
diff --git a/certificates/certificates_darwin.h b/certificates/certificates_darwin.h
new file mode 100644
index 000000000..78ba0ae5f
--- /dev/null
+++ b/certificates/certificates_darwin.h
@@ -0,0 +1,7 @@
+const char *getDefaultBrowserName();
+
+const char *installCert(const char *path);
+const char *uninstallCert();
+const bool certInKeychain();
+
+const char *getExpirationDate(long *expirationDate);
\ No newline at end of file
diff --git a/certificates/certificates_darwin.m b/certificates/certificates_darwin.m
new file mode 100644
index 000000000..0ac511833
--- /dev/null
+++ b/certificates/certificates_darwin.m
@@ -0,0 +1,137 @@
+#import 
+#import 
+#include "certificates_darwin.h"
+
+// Used to return error strings (as NSString) as a C-string to the Go code.
+const char *toErrorString(NSString *errString) {
+    NSLog(@"%@", errString);
+    return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+}
+
+// Returns a string describing the name of the default browser set for the user, nil in case of error.
+const char *getDefaultBrowserName() {
+    NSURL *defaultBrowserURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:[NSURL URLWithString:@"http://"]];
+    if (defaultBrowserURL) {
+        NSBundle *defaultBrowserBundle = [NSBundle bundleWithURL:defaultBrowserURL];
+        NSString *defaultBrowser = [defaultBrowserBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
+
+        return [defaultBrowser cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    return "";
+}
+
+// inspired by https://stackoverflow.com/questions/12798950/ios-install-ssl-certificate-programmatically
+const char *installCert(const char *path) {
+    NSURL *url = [NSURL fileURLWithPath:@(path) isDirectory:NO];
+    NSData *rootCertData = [NSData dataWithContentsOfURL:url];
+
+    OSStatus err = noErr;
+    SecCertificateRef rootCert = SecCertificateCreateWithData(kCFAllocatorDefault, (CFDataRef) rootCertData);
+
+    CFTypeRef result;
+
+    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
+        (id)kSecClassCertificate, kSecClass,
+        rootCert, kSecValueRef,
+        nil];
+
+    err = SecItemAdd((CFDictionaryRef)dict, &result);
+
+    if (err == noErr) {
+        NSLog(@"Install root certificate success");
+    } else if (err == errSecDuplicateItem) {
+        NSString *errString = [@"duplicate root certificate entry. Error: " stringByAppendingFormat:@"%d", err];
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    } else {
+        NSString *errString = [@"install root certificate failure. Error: " stringByAppendingFormat:@"%d", err];
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    NSDictionary *newTrustSettings = @{(id)kSecTrustSettingsResult: [NSNumber numberWithInt:kSecTrustSettingsResultTrustRoot]};
+    err = SecTrustSettingsSetTrustSettings(rootCert, kSecTrustSettingsDomainUser, (__bridge CFTypeRef)(newTrustSettings));
+    if (err != errSecSuccess) {
+        NSString *errString = [@"Could not change the trust setting for a certificate. Error: " stringByAppendingFormat:@"%d", err];
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+
+    return "";
+}
+
+const char *uninstallCert() {
+    // Each line is a key-value of the dictionary. Note: the the inverted order, value first then key.
+    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
+        (id)kSecClassCertificate, kSecClass,
+        CFSTR("Arduino"), kSecAttrLabel,
+        kSecMatchLimitOne, kSecMatchLimit,
+        kCFBooleanTrue, kSecReturnAttributes,
+        nil];
+
+    OSStatus err = noErr;
+    // Use this function to check for errors
+    err = SecItemCopyMatching((CFDictionaryRef)dict, nil);
+    if (err == noErr) {
+        err = SecItemDelete((CFDictionaryRef)dict);
+        if (err != noErr) {
+            NSString *errString = [@"Could not delete the certificates. Error: " stringByAppendingFormat:@"%d", err];
+            NSLog(@"%@", errString);
+            return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+        }
+    } else if (err != errSecItemNotFound){
+        NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err];
+        NSLog(@"%@", errString);
+        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
+    }
+    return "";
+}
+
+const bool certInKeychain() {
+    // Create a key-value dictionary used to query the Keychain and look for the "Arduino" root certificate.
+    NSDictionary *getquery = @{
+                (id)kSecClass:     (id)kSecClassCertificate,
+                (id)kSecAttrLabel: @"Arduino",
+                (id)kSecReturnRef: @YES,
+            };
+
+    OSStatus err = SecItemCopyMatching((CFDictionaryRef)getquery, nil);
+    return (err == noErr); // No error means the certificate was found, otherwise err will be "errSecItemNotFound".
+}
+
+// Returns the expiration date "kSecOIDX509V1ValidityNotAfter" of the Arduino certificate.
+// The value is returned as a CFAbsoluteTime: a long number of seconds from the date of 1 Jan 2001 00:00:00 GMT.
+const char *getExpirationDate(long *expirationDate) {
+    // Create a key-value dictionary used to query the Keychain and look for the "Arduino" root certificate.
+    NSDictionary *getquery = @{
+                (id)kSecClass:     (id)kSecClassCertificate,
+                (id)kSecAttrLabel: @"Arduino",
+                (id)kSecReturnRef: @YES,
+            };
+
+    SecCertificateRef cert = NULL;
+
+    // Search the keychain for certificates matching the query above.
+    OSStatus err = SecItemCopyMatching((CFDictionaryRef)getquery, (CFTypeRef *)&cert);
+    if (err != noErr) return toErrorString([@"Error getting the certificate: " stringByAppendingFormat:@"%d", err]);
+
+    // Get data from the certificate, as a dictionary of properties. We just need the "invalidity not after" property.
+    CFDictionaryRef certDict = SecCertificateCopyValues(cert, 
+        (__bridge CFArrayRef)@[(__bridge id)kSecOIDX509V1ValidityNotAfter], NULL);
+    if (certDict == NULL) return toErrorString(@"SecCertificateCopyValues failed");
+
+
+    // Get the "validity not after" property as a dictionary, and get the "value" key (that is a number).
+    CFDictionaryRef validityNotAfterDict = CFDictionaryGetValue(certDict, kSecOIDX509V1ValidityNotAfter);
+    if (validityNotAfterDict == NULL) return toErrorString(@"CFDictionaryGetValue (validity) failed");
+
+    CFNumberRef number = (CFNumberRef)CFDictionaryGetValue(validityNotAfterDict, kSecPropertyKeyValue);
+    if (number == NULL) return toErrorString(@"CFDictionaryGetValue (keyValue) failed");
+
+    CFNumberGetValue(number, kCFNumberSInt64Type, expirationDate);
+    // NSLog(@"Certificate validity not after: %ld", *expirationDate);
+
+    CFRelease(certDict);
+    return ""; // No error.
+}
\ No newline at end of file
diff --git a/certificates/install_darwin.go b/certificates/install_darwin.go
index 892c390b0..515c9f7d4 100644
--- a/certificates/install_darwin.go
+++ b/certificates/install_darwin.go
@@ -15,146 +15,20 @@
 
 package certificates
 
-//inspired by https://stackoverflow.com/questions/12798950/ios-install-ssl-certificate-programmatically
-
 /*
 // Explicitly tell the GCC compiler that the language is Objective-C.
 #cgo CFLAGS: -x objective-c
-// Pass the list of macOS frameworks needed by this piece of Objective-C code.
-#cgo LDFLAGS: -framework Cocoa
-#import 
-
-const char *installCert(const char *path) {
-    NSURL *url = [NSURL fileURLWithPath:@(path) isDirectory:NO];
-    NSData *rootCertData = [NSData dataWithContentsOfURL:url];
-
-    OSStatus err = noErr;
-    SecCertificateRef rootCert = SecCertificateCreateWithData(kCFAllocatorDefault, (CFDataRef) rootCertData);
-
-    CFTypeRef result;
-
-    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
-        (id)kSecClassCertificate, kSecClass,
-        rootCert, kSecValueRef,
-        nil];
-
-    err = SecItemAdd((CFDictionaryRef)dict, &result);
-
-    if (err == noErr) {
-        NSLog(@"Install root certificate success");
-    } else if (err == errSecDuplicateItem) {
-        NSString *errString = [@"duplicate root certificate entry. Error: " stringByAppendingFormat:@"%d", err];
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];;
-    } else {
-        NSString *errString = [@"install root certificate failure. Error: " stringByAppendingFormat:@"%d", err];
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
-    }
-
-    NSDictionary *newTrustSettings = @{(id)kSecTrustSettingsResult: [NSNumber numberWithInt:kSecTrustSettingsResultTrustRoot]};
-    err = SecTrustSettingsSetTrustSettings(rootCert, kSecTrustSettingsDomainUser, (__bridge CFTypeRef)(newTrustSettings));
-    if (err != errSecSuccess) {
-        NSString *errString = [@"Could not change the trust setting for a certificate. Error: " stringByAppendingFormat:@"%d", err];
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
-    }
-
-    return "";
-}
-
-const char *uninstallCert() {
-    // Each line is a key-value of the dictionary. Note: the the inverted order, value first then key.
-    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
-        (id)kSecClassCertificate, kSecClass,
-        CFSTR("Arduino"), kSecAttrLabel,
-        kSecMatchLimitOne, kSecMatchLimit,
-        kCFBooleanTrue, kSecReturnAttributes,
-        nil];
-
-    OSStatus err = noErr;
-    // Use this function to check for errors
-    err = SecItemCopyMatching((CFDictionaryRef)dict, nil);
-    if (err == noErr) {
-        err = SecItemDelete((CFDictionaryRef)dict);
-        if (err != noErr) {
-            NSString *errString = [@"Could not delete the certificates. Error: " stringByAppendingFormat:@"%d", err];
-            NSLog(@"%@", errString);
-            return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];;
-        }
-    } else if (err != errSecItemNotFound){
-        NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err];
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];;
-    }
-    return "";
-}
-
-const char *getExpirationDate(char *expirationDate){
-    // Create a key-value dictionary used to query the Keychain and look for the "Arduino" root certificate.
-    NSDictionary *getquery = @{
-                (id)kSecClass:     (id)kSecClassCertificate,
-                (id)kSecAttrLabel: @"Arduino",
-                (id)kSecReturnRef: @YES,
-            };
-
-    OSStatus err = noErr;
-    SecCertificateRef cert = NULL;
-
-    // Use this function to check for errors
-    err = SecItemCopyMatching((CFDictionaryRef)getquery, (CFTypeRef *)&cert);
-
-    if (err != noErr){
-        NSString *errString = [@"Error: " stringByAppendingFormat:@"%d", err];
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
-    }
 
-    // Get data from the certificate. We just need the "invalidity date" property.
-    CFDictionaryRef valuesDict = SecCertificateCopyValues(cert, (__bridge CFArrayRef)@[(__bridge id)kSecOIDInvalidityDate], NULL);
-
-    id expirationDateValue;
-    if(valuesDict){
-        CFDictionaryRef invalidityDateDictionaryRef = CFDictionaryGetValue(valuesDict, kSecOIDInvalidityDate);
-        if(invalidityDateDictionaryRef){
-            CFTypeRef invalidityRef = CFDictionaryGetValue(invalidityDateDictionaryRef, kSecPropertyKeyValue);
-            if(invalidityRef){
-                expirationDateValue = CFBridgingRelease(invalidityRef);
-            }
-        }
-        CFRelease(valuesDict);
-    }
-
-    NSString *outputString = [@"" stringByAppendingFormat:@"%@", expirationDateValue];
-    if([outputString isEqualToString:@""]){
-        NSString *errString = @"Error: the expiration date of the certificate could not be found";
-        NSLog(@"%@", errString);
-        return [errString cStringUsingEncoding:[NSString defaultCStringEncoding]];
-    }
-
-    // This workaround allows to obtain the expiration date alongside the error message
-    strncpy(expirationDate, [outputString cStringUsingEncoding:[NSString defaultCStringEncoding]], 32);
-    expirationDate[32-1] = 0;
-
-    return "";
-}
-
-const char *getDefaultBrowserName() {
-    NSURL *defaultBrowserURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:[NSURL URLWithString:@"http://"]];
-    if (defaultBrowserURL) {
-        NSBundle *defaultBrowserBundle = [NSBundle bundleWithURL:defaultBrowserURL];
-        NSString *defaultBrowser = [defaultBrowserBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
-
-        return [defaultBrowser cStringUsingEncoding:[NSString defaultCStringEncoding]];
-    }
+// Pass the list of macOS frameworks needed by this piece of Objective-C code.
+#cgo LDFLAGS: -framework Foundation -framework Security -framework AppKit
 
-    return "";
-}
+#import 
+#include "certificates_darwin.h"
 */
 import "C"
 import (
 	"errors"
-	"strings"
+	"time"
 	"unsafe"
 
 	log "github.com/sirupsen/logrus"
@@ -172,7 +46,7 @@ func InstallCertificate(cert *paths.Path) error {
 	p := C.installCert(ccert)
 	s := C.GoString(p)
 	if len(s) != 0 {
-		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error installing certificates\"")
+		utilities.UserPrompt(s, "\"OK\"", "OK", "OK", "Arduino Agent: Error installing certificates")
 		UninstallCertificates()
 		return errors.New(s)
 	}
@@ -186,25 +60,29 @@ func UninstallCertificates() error {
 	p := C.uninstallCert()
 	s := C.GoString(p)
 	if len(s) != 0 {
-		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error uninstalling certificates\"")
+		utilities.UserPrompt(s, "\"OK\"", "OK", "OK", "Arduino Agent: Error uninstalling certificates")
 		return errors.New(s)
 	}
 	return nil
 }
 
 // GetExpirationDate returns the expiration date of a certificate stored in the keychain
-func GetExpirationDate() (string, error) {
+func GetExpirationDate() (time.Time, error) {
 	log.Infof("Retrieving certificate's expiration date")
-	dateString := C.CString("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") // 32 characters string
-	defer C.free(unsafe.Pointer(dateString))
-	p := C.getExpirationDate(dateString)
-	s := C.GoString(p)
-	if len(s) != 0 {
-		utilities.UserPrompt("display dialog \"" + s + "\" buttons \"OK\" with title \"Arduino Agent: Error retrieving expiration date\"")
-		return "", errors.New(s)
+
+	expirationDateLong := C.long(0)
+
+	err := C.getExpirationDate(&expirationDateLong)
+	errString := C.GoString(err)
+	if len(errString) > 0 {
+		utilities.UserPrompt(errString, "\"OK\"", "OK", "OK", "Arduino Agent: Error retrieving expiration date")
+		return time.Time{}, errors.New(errString)
 	}
-	date := C.GoString(dateString)
-	return strings.ReplaceAll(date, " +0000", ""), nil
+
+	// The expirationDate is the number of seconds from the date of 1 Jan 2001 00:00:00 GMT.
+	// Add 31 years to convert it to Unix Epoch.
+	expirationDate := int64(expirationDateLong)
+	return time.Unix(expirationDate, 0).AddDate(31, 0, 0), nil
 }
 
 // GetDefaultBrowserName returns the name of the default browser
@@ -213,3 +91,11 @@ func GetDefaultBrowserName() string {
 	p := C.getDefaultBrowserName()
 	return C.GoString(p)
 }
+
+// CertInKeychain checks if the certificate is stored inside the keychain
+func CertInKeychain() bool {
+	log.Infof("Checking if the Arduino certificate is in the keychain")
+
+	certInKeychain := C.certInKeychain()
+	return bool(certInKeychain)
+}
diff --git a/certificates/install_default.go b/certificates/install_default.go
index 8013c018d..533574d69 100644
--- a/certificates/install_default.go
+++ b/certificates/install_default.go
@@ -19,6 +19,7 @@ package certificates
 
 import (
 	"errors"
+	"time"
 
 	log "github.com/sirupsen/logrus"
 
@@ -38,9 +39,9 @@ func UninstallCertificates() error {
 }
 
 // GetExpirationDate won't do anything on unsupported Operative Systems
-func GetExpirationDate() (string, error) {
+func GetExpirationDate() (time.Time, error) {
 	log.Warn("platform not supported for retrieving certificates expiration date")
-	return "", errors.New("platform not supported for retrieving certificates expiration date")
+	return time.Time{}, errors.New("platform not supported for retrieving certificates expiration date")
 }
 
 // GetDefaultBrowserName won't do anything on unsupported Operative Systems
@@ -48,3 +49,9 @@ func GetDefaultBrowserName() string {
 	log.Warn("platform not supported for retrieving default browser name")
 	return ""
 }
+
+// CertInKeychain won't do anything on unsupported Operative Systems
+func CertInKeychain() bool {
+	log.Warn("platform not supported for verifying the certificate existence")
+	return false
+}
diff --git a/main.go b/main.go
index 0231548d4..1ca857b02 100755
--- a/main.go
+++ b/main.go
@@ -178,7 +178,7 @@ func loop() {
 	// If we are updating manually from 1.2.7 to 1.3.0 we have to uninstall the old agent manually first.
 	// This check will inform the user if he needs to run the uninstall first
 	if runtime.GOOS == "darwin" && oldInstallExists() {
-		utilities.UserPrompt("display dialog \"Old agent installation of the Arduino Create Agent found, please uninstall it before launching the new one\" buttons \"OK\" with title \"Error\"")
+		utilities.UserPrompt("Old agent installation of the Arduino Create Agent found, please uninstall it before launching the new one", "\"OK\"", "OK", "OK", "Error")
 		os.Exit(0)
 	}
 
@@ -223,25 +223,27 @@ func loop() {
 
 	// if the default browser is Safari, prompt the user to install HTTPS certificates
 	// and eventually install them
-	if runtime.GOOS == "darwin" && cert.GetDefaultBrowserName() == "Safari" {
+	if runtime.GOOS == "darwin" {
 		if exist, err := installCertsKeyExists(configPath.String()); err != nil {
 			log.Panicf("config.ini cannot be parsed: %s", err)
 		} else if !exist {
-			if config.CertsExist() {
-				err = config.SetInstallCertsIni(configPath.String(), "true")
-				if err != nil {
-					log.Panicf("config.ini cannot be parsed: %s", err)
-				}
-			} else if cert.PromptInstallCertsSafari() {
+			if cert.CertInKeychain() || config.CertsExist() {
 				err = config.SetInstallCertsIni(configPath.String(), "true")
 				if err != nil {
 					log.Panicf("config.ini cannot be parsed: %s", err)
 				}
-				cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
-			} else {
-				err = config.SetInstallCertsIni(configPath.String(), "false")
-				if err != nil {
-					log.Panicf("config.ini cannot be parsed: %s", err)
+			} else if cert.GetDefaultBrowserName() == "Safari" {
+				if promptInstallCertsSafari() {
+					err = config.SetInstallCertsIni(configPath.String(), "true")
+					if err != nil {
+						log.Panicf("config.ini cannot be parsed: %s", err)
+					}
+					cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
+				} else {
+					err = config.SetInstallCertsIni(configPath.String(), "false")
+					if err != nil {
+						log.Panicf("config.ini cannot be parsed: %s", err)
+					}
 				}
 			}
 		}
@@ -369,21 +371,38 @@ func loop() {
 		}
 	}
 
-	// check if the HTTPS certificates are expired and prompt the user to update them on macOS
-	if runtime.GOOS == "darwin" && cert.GetDefaultBrowserName() == "Safari" {
-		if *installCerts {
-			if config.CertsExist() {
-				cert.PromptExpiredCerts(config.GetCertificatesDir())
-			} else if cert.PromptInstallCertsSafari() {
-				// installing the certificates from scratch at this point should only happen if
-				// something went wrong during previous installation attempts
-				cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
-			} else {
-				err = config.SetInstallCertsIni(configPath.String(), "false")
-				if err != nil {
-					log.Panicf("config.ini cannot be parsed: %s", err)
+	// check if the HTTPS certificates are expired or expiring and prompt the user to update them on macOS
+	if runtime.GOOS == "darwin" && *installCerts {
+		if cert.CertInKeychain() || config.CertsExist() {
+			certDir := config.GetCertificatesDir()
+			if expired, err := cert.IsExpired(); err != nil {
+				log.Errorf("cannot check if certificates are expired something went wrong: %s", err)
+			} else if expired {
+				buttonPressed := utilities.UserPrompt("The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nYour certificate is expired or close to expiration. Do you want to update it?", "{\"Do not update\", \"Update the certificate for Safari\"}", "Update the certificate for Safari", "Update the certificate for Safari", "Arduino Agent: Update certificate")
+				if buttonPressed {
+					err := cert.UninstallCertificates()
+					if err != nil {
+						log.Errorf("cannot uninstall certificates something went wrong: %s", err)
+					} else {
+						cert.DeleteCertificates(certDir)
+						cert.GenerateAndInstallCertificates(certDir)
+					}
+				} else {
+					err = config.SetInstallCertsIni(configPath.String(), "false")
+					if err != nil {
+						log.Panicf("config.ini cannot be parsed: %s", err)
+					}
 				}
 			}
+		} else if promptInstallCertsSafari() {
+			// installing the certificates from scratch at this point should only happen if
+			// something went wrong during previous installation attempts
+			cert.GenerateAndInstallCertificates(config.GetCertificatesDir())
+		} else {
+			err = config.SetInstallCertsIni(configPath.String(), "false")
+			if err != nil {
+				log.Panicf("config.ini cannot be parsed: %s", err)
+			}
 		}
 	}
 
@@ -534,3 +553,7 @@ func installCertsKeyExists(filename string) (bool, error) {
 	}
 	return cfg.Section("").HasKey("installCerts"), nil
 }
+
+func promptInstallCertsSafari() bool {
+	return utilities.UserPrompt("The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\nIf you use Safari, you need to install it.", "{\"Do not install\", \"Install the certificate for Safari\"}", "Install the certificate for Safari", "Install the certificate for Safari", "Arduino Agent: Install certificate")
+}
diff --git a/systray/systray_real.go b/systray/systray_real.go
index 503373d82..5ae79f086 100644
--- a/systray/systray_real.go
+++ b/systray/systray_real.go
@@ -22,7 +22,7 @@ package systray
 import (
 	"os"
 	"runtime"
-	"strings"
+	"time"
 
 	"fyne.io/systray"
 	cert "github.com/arduino/arduino-create-agent/certificates"
@@ -95,38 +95,42 @@ func (s *Systray) start() {
 				s.updateMenuItem(mRmCrashes, config.LogsIsEmpty())
 			case <-mManageCerts.ClickedCh:
 				infoMsg := "The Arduino Agent needs a local HTTPS certificate to work correctly with Safari.\n\nYour HTTPS certificate status:\n"
-				buttons := "{\"Install the certificate for Safari\", \"OK\"} default button \"OK\""
+				buttons := "{\"Install the certificate for Safari\", \"OK\"}"
+				toPress := "Install the certificate for Safari"
 				certDir := config.GetCertificatesDir()
-				if config.CertsExist() {
+				if cert.CertInKeychain() || config.CertsExist() {
 					expDate, err := cert.GetExpirationDate()
 					if err != nil {
 						log.Errorf("cannot get certificates expiration date, something went wrong: %s", err)
 					}
-					infoMsg = infoMsg + "- Certificate installed: Yes\n- Certificate trusted: Yes\n- Certificate expiration date: " + expDate
-					buttons = "{\"Uninstall the certificate for Safari\", \"OK\"} default button \"OK\""
-				} else {
-					infoMsg = infoMsg + "- Certificate installed: No\n- Certificate trusted: N/A\n- Certificate expiration date: N/A"
-				}
-				pressedButton := utilities.UserPrompt("display dialog \"" + infoMsg + "\" buttons " + buttons + " with title \"Arduino Agent: Manage HTTPS certificate\"")
-				if strings.Contains(pressedButton, "Install certificate for Safari") {
-					cert.GenerateAndInstallCertificates(certDir)
-					err := config.SetInstallCertsIni(s.currentConfigFilePath.String(), "true")
-					if err != nil {
-						log.Errorf("cannot set installCerts value in config.ini: %s", err)
+					infoMsg = infoMsg + "- Certificate installed:\t\tYes\n- Certificate trusted:\t\tYes\n- Certificate expiration:\t" + expDate.Format(time.DateTime)
+					buttons = "{\"Uninstall the certificate for Safari\", \"OK\"}"
+					toPress = "Uninstall the certificate for Safari"
+					pressedButton := utilities.UserPrompt(infoMsg, buttons, "OK", toPress, "Arduino Agent: Manage HTTPS certificate")
+					if pressedButton {
+						err := cert.UninstallCertificates()
+						if err != nil {
+							log.Errorf("cannot uninstall certificates something went wrong: %s", err)
+						} else {
+							cert.DeleteCertificates(certDir)
+							err = config.SetInstallCertsIni(s.currentConfigFilePath.String(), "false")
+							if err != nil {
+								log.Errorf("cannot set installCerts value in config.ini: %s", err)
+							}
+						}
+						s.Restart()
 					}
-					s.Restart()
-				} else if strings.Contains(pressedButton, "Uninstall certificate for Safari") {
-					err := cert.UninstallCertificates()
-					if err != nil {
-						log.Errorf("cannot uninstall certificates something went wrong: %s", err)
-					} else {
-						cert.DeleteCertificates(certDir)
-						err = config.SetInstallCertsIni(s.currentConfigFilePath.String(), "false")
+				} else {
+					infoMsg = infoMsg + "- Certificate installed:\t\tNo\n- Certificate trusted:\t\tN/A\n- Certificate expiration:\tN/A"
+					pressedButton := utilities.UserPrompt(infoMsg, buttons, "OK", toPress, "Arduino Agent: Manage HTTPS certificate")
+					if pressedButton {
+						cert.GenerateAndInstallCertificates(certDir)
+						err := config.SetInstallCertsIni(s.currentConfigFilePath.String(), "true")
 						if err != nil {
 							log.Errorf("cannot set installCerts value in config.ini: %s", err)
 						}
+						s.Restart()
 					}
-					s.Restart()
 				}
 			case <-mPause.ClickedCh:
 				s.Pause()
diff --git a/utilities/utilities.go b/utilities/utilities.go
index 63f09103e..5979732d4 100644
--- a/utilities/utilities.go
+++ b/utilities/utilities.go
@@ -151,8 +151,8 @@ func VerifyInput(input string, signature string) error {
 }
 
 // UserPrompt executes an osascript and returns the pressed button
-func UserPrompt(dialog string) string {
-	oscmd := exec.Command("osascript", "-e", dialog)
+func UserPrompt(dialog string, buttons string, defaultButton string, toPress string, title string) bool {
+	oscmd := exec.Command("osascript", "-e", "display dialog \""+dialog+"\" buttons "+buttons+" default button\""+defaultButton+"\" with title \""+title+"\"")
 	pressedButton, _ := oscmd.Output()
-	return string(pressedButton)
+	return strings.Contains(string(pressedButton), "button returned:"+toPress)
 }

From 2fa738f147f149ec208f6c10c30095d6b90f789f Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Wed, 15 May 2024 09:49:44 +0200
Subject: [PATCH 14/51] Show message to the user after a successful certificate
 installation (#951)

* Show message to the user after a successful certificate installation

* Show a simplified message (different for install and uninstall cases)

---------

Co-authored-by: Xayton <30591904+Xayton@users.noreply.github.com>
---
 certificates/certificates.go | 2 ++
 systray/systray_real.go      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/certificates/certificates.go b/certificates/certificates.go
index 8a8c50d86..ae2843d22 100644
--- a/certificates/certificates.go
+++ b/certificates/certificates.go
@@ -32,6 +32,7 @@ import (
 	"os"
 	"time"
 
+	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/arduino/go-paths-helper"
 	log "github.com/sirupsen/logrus"
 )
@@ -286,4 +287,5 @@ func GenerateAndInstallCertificates(certDir *paths.Path) {
 		log.Errorf("cannot install certificates something went wrong: %s", err)
 		DeleteCertificates(certDir)
 	}
+	utilities.UserPrompt("The HTTPS certificate has been installed correctly.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
 }
diff --git a/systray/systray_real.go b/systray/systray_real.go
index 5ae79f086..b070f22af 100644
--- a/systray/systray_real.go
+++ b/systray/systray_real.go
@@ -117,6 +117,7 @@ func (s *Systray) start() {
 							if err != nil {
 								log.Errorf("cannot set installCerts value in config.ini: %s", err)
 							}
+							utilities.UserPrompt("The HTTPS certificate has been uninstalled.", "{\"OK\"}", "OK", "OK", "Arduino Agent: HTTPS certificate installation")
 						}
 						s.Restart()
 					}

From fc0a137a0953f8e07ed00f763aadcae9992593a5 Mon Sep 17 00:00:00 2001
From: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
Date: Thu, 16 May 2024 11:29:44 +0200
Subject: [PATCH 15/51] use eToken for signing (#950)

* fix typo

* use eToken for signing, create a dedicated step for signing

* update workflow, we have a certificate and no longer a container for win

* env var $GITHUB_REF not expanded in step input causing workflow to fail

* bump runner, so that we get an updated version of openssl

OpenSSL 1.1.1f-1ubuntu2.22 in Ubuntu 20.04 https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md
OpenSSL 3.0.2-0ubuntu1.15 in Ubuntu 22.04 https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

* add flag to correctly recognize the algorithm

see https://github.com/openssl/openssl/discussions/23089

* remove double quotes, they cause errors with new version of openssl:
`Could not read certificate from `
---
 .github/workflows/check-certificates.yml | 69 +++++++++++++++---------
 .github/workflows/release.yml            | 59 +++++++++++++++-----
 2 files changed, 92 insertions(+), 36 deletions(-)

diff --git a/.github/workflows/check-certificates.yml b/.github/workflows/check-certificates.yml
index 28e8297c1..694792dcd 100644
--- a/.github/workflows/check-certificates.yml
+++ b/.github/workflows/check-certificates.yml
@@ -26,7 +26,7 @@ jobs:
     if: >
       (github.event_name != 'pull_request' && github.repository == 'arduino/arduino-create-agent') ||
       (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'arduino/arduino-create-agent')
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
 
     strategy:
       fail-fast: false
@@ -37,9 +37,11 @@ jobs:
           - identifier: macOS signing certificate # Text used to identify certificate in notifications.
             certificate-secret: INSTALLER_CERT_MAC_P12  # Name of the secret that contains the certificate.
             password-secret: INSTALLER_CERT_MAC_PASSWORD  # Name of the secret that contains the certificate password.
+            type: pkcs12
           - identifier: Windows signing certificate
-            certificate-secret: INSTALLER_CERT_WINDOWS_PFX
-            password-secret: INSTALLER_CERT_WINDOWS_PASSWORD
+            certificate-secret: INSTALLER_CERT_WINDOWS_CER
+            # The password for the Windows certificate is not needed, because its not a container, but a single certificate.
+            type: x509
 
     steps:
       - name: Set certificate path environment variable
@@ -58,9 +60,10 @@ jobs:
           CERTIFICATE_PASSWORD: ${{ secrets[matrix.certificate.password-secret] }}
         run: |
           (
-            openssl pkcs12 \
+            openssl ${{ matrix.certificate.type }} \
               -in "${{ env.CERTIFICATE_PATH }}" \
-              -noout -passin env:CERTIFICATE_PASSWORD
+              -noout -passin env:CERTIFICATE_PASSWORD \
+              -legacy
           ) || (
             echo "::error::Verification of ${{ matrix.certificate.identifier }} failed!!!"
             exit 1
@@ -83,25 +86,43 @@ jobs:
           CERTIFICATE_PASSWORD: ${{ secrets[matrix.certificate.password-secret] }}
         id: get-days-before-expiration
         run: |
-          EXPIRATION_DATE="$(
-            (
-              openssl pkcs12 \
-                -in "${{ env.CERTIFICATE_PATH }}" \
-                -clcerts \
-                -nodes \
-                -passin env:CERTIFICATE_PASSWORD
-            ) | (
-              openssl x509 \
-                -noout \
-                -enddate
-            ) | (
-              grep \
-                --max-count=1 \
-                --only-matching \
-                --perl-regexp \
-                'notAfter=(\K.*)'
-            )
-          )"
+          if [[ ${{ matrix.certificate.type }} == "pkcs12" ]]; then
+            EXPIRATION_DATE="$(
+                (
+                openssl pkcs12 \
+                    -in ${{ env.CERTIFICATE_PATH }} \
+                    -clcerts \
+                    -nodes \
+                    -passin env:CERTIFICATE_PASSWORD \
+                    -legacy
+                ) | (
+                openssl x509 \
+                    -noout \
+                    -enddate
+                ) | (
+                grep \
+                    --max-count=1 \
+                    --only-matching \
+                    --perl-regexp \
+                    'notAfter=(\K.*)'
+                )
+            )"
+          elif [[ ${{ matrix.certificate.type }} == "x509" ]]; then
+            EXPIRATION_DATE="$(
+                (
+                openssl x509 \
+                    -in ${{ env.CERTIFICATE_PATH }} \
+                    -noout \
+                    -enddate
+                ) | (
+                grep \
+                    --max-count=1 \
+                    --only-matching \
+                    --perl-regexp \
+                    'notAfter=(\K.*)'
+                )
+            )"
+          fi
 
           DAYS_BEFORE_EXPIRATION="$((($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24))"
 
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2ae2cf4e4..33fe2b7e8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -45,7 +45,7 @@ jobs:
       run:
         shell: bash
 
-# by default disable CGO, it's not needed (except on macos)
+    # by default disable CGO, it's not needed (except on macos)
     env:
       CGO_ENABLED: 0
 
@@ -157,7 +157,7 @@ jobs:
   create-macos-bundle:
     needs: build
 
-    # for not they are exaclty the same
+    # for now they are exaclty the same
     strategy:
       matrix:
         arch: [amd64, arm64]
@@ -371,9 +371,6 @@ jobs:
       # vars used by installbuilder
       INSTALLBUILDER_PATH: "/opt/installbuilder-23.11.0/bin/builder"
       INSTALLER_VARS: "project.outputDirectory=$PWD project.version=${GITHUB_REF##*/} workspace=$PWD realname=Arduino_Create_Agent"
-      # installbuilder will read this vars automatically (defined in installer.xml):
-      INSTALLER_CERT_WINDOWS_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
-      INSTALLER_CERT_WINDOWS_PFX: "/tmp/ArduinoCerts2020.pfx"
 
     strategy:
       fail-fast: false # if one os is failing continue nonetheless
@@ -424,11 +421,6 @@ jobs:
       - name: Save InstallBuilder license to file
         run: echo "${{ secrets.INSTALLER_LICENSE }}" > /tmp/license.xml
 
-      - name: Save Win signing certificate to file
-        run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_PFX }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_PFX}}
-        if: matrix.os == 'windows-2019'
-
-        # installbuilder reads the env vars with certs paths and use it to sign the installer.
       - name: Launch Bitrock installbuilder
         run: ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.installbuilder-name }} --verbose --license /tmp/license.xml  --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}
 
@@ -443,6 +435,49 @@ jobs:
           path: ArduinoCreateAgent*
           if-no-files-found: error
 
+  # This job will sign the Windows installer
+  sign-windows:
+    runs-on: [self-hosted, windows-sign-pc]
+    needs: package
+
+    defaults:
+      run:
+        shell: bash
+
+    env:
+      INSTALLER_CERT_WINDOWS_CER: "/tmp/cert.cer"
+      # We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
+      # Keep in mind that this path could change when upgrading to a new runner version
+      SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
+    
+    strategy:
+      matrix:
+        arch: [amd64, 386]
+    
+    steps:
+      - name: Download artifact
+        uses: actions/download-artifact@v3
+        with:
+          name: ArduinoCreateAgent-windows-${{ matrix.arch }}
+      
+      - name: Save Win signing certificate to file
+        run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
+
+      - name: Sign EXE
+        env:
+          CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
+          CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
+          # https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
+        run: | 
+          "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
+
+      - name: Upload artifacts
+        uses: actions/upload-artifact@v3
+        with:
+          if-no-files-found: error
+          name: ArduinoCreateAgent-windows-${{ matrix.arch }}-signed
+          path: ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
+
   # This job will generate a dmg mac installer, sign/notarize it.
   generate-sign-dmg:
     needs: notarize-macos
@@ -544,7 +579,7 @@ jobs:
   create-release:
     runs-on: ubuntu-20.04
     environment: production
-    needs: [build, package, generate-sign-dmg]
+    needs: [build, generate-sign-dmg, sign-windows]
 
     steps:
       - name: Checkout
@@ -563,7 +598,7 @@ jobs:
           mv -v ArduinoCreateAgent-linux-amd64/* release/
           cat ArduinoCreateAgent-osx-amd64/*.tar | tar -xvf - -i -C release/
           rm -v release/._ArduinoCreateAgent*.dmg
-          mv -v ArduinoCreateAgent-windows*/* release/
+          mv -v ArduinoCreateAgent-windows*-signed/* release/
 
       - name: VirusTotal Scan
         id: virustotal_step

From 7e79dfd1f96e7a2523244e02bcd08b234fce3a09 Mon Sep 17 00:00:00 2001
From: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
Date: Thu, 16 May 2024 11:41:32 +0200
Subject: [PATCH 16/51] Bump actions/upload and actions/download (#952)

* Bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] 

* Bump actions/download-artifact in new step

* Bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] 

* Bump actions/upload-artifact in new step

* Migrate sync workflow to actions/[upload-download] to v4

See https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact

---------

Signed-off-by: dependabot[bot] 
---
 .../workflows/check-go-dependencies-task.yml  |  2 +-
 .github/workflows/publish-go-tester-task.yml  |  2 +-
 .github/workflows/release.yml                 | 24 +++++++++----------
 .github/workflows/sync-labels.yml             |  9 +++----
 4 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml
index 1d640ed43..4983e0db6 100644
--- a/.github/workflows/check-go-dependencies-task.yml
+++ b/.github/workflows/check-go-dependencies-task.yml
@@ -105,7 +105,7 @@ jobs:
       # Some might find it convenient to have CI generate the cache rather than setting up for it locally
       - name: Upload cache to workflow artifact
         if: failure() && steps.diff.outcome == 'failure'
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           name: dep-licenses-cache
diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml
index 5ba56a6f3..66b381643 100644
--- a/.github/workflows/publish-go-tester-task.yml
+++ b/.github/workflows/publish-go-tester-task.yml
@@ -128,7 +128,7 @@ jobs:
         if: runner.os == 'macOS'
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: arduino-create-agent-${{ matrix.os }}${{ matrix.arch }}
           path: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 33fe2b7e8..ce3caa1b7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -147,7 +147,7 @@ jobs:
         if: steps.prerelease.outputs.IS_PRE != 'true'
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}-${{ matrix.arch }}
           path: |
@@ -174,7 +174,7 @@ jobs:
           token: ${{ secrets.ARDUINO_CREATE_AGENT_CI_PAT }}
 
       - name: Download artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: ${{ env.PROJECT_NAME }}-macos-12-amd64 # if we want to support darwin-arm64 in the future for real this has to change.
           path: ${{ env.EXE_PATH }}
@@ -218,7 +218,7 @@ jobs:
         run: tar -cvf ArduinoCreateAgent.app_${{ matrix.arch }}.tar -C skel/ .
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           name: ArduinoCreateAgent.app_${{ matrix.arch }}
@@ -241,7 +241,7 @@ jobs:
 
     steps:
       - name: Download artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: ArduinoCreateAgent.app_${{ matrix.arch }}
 
@@ -356,7 +356,7 @@ jobs:
         if: ${{ needs.build.outputs.prerelease != 'true' }}
 
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: ArduinoCreateAgent.app_${{ matrix.arch }}_notarized
           path: ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
@@ -405,7 +405,7 @@ jobs:
           token: ${{ secrets.ARDUINO_CREATE_AGENT_CI_PAT }}
 
       - name: Download artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}-${{ matrix.arch }}
           path: artifacts/${{ matrix.platform-name }}/ # path expected by installbuilder
@@ -429,7 +429,7 @@ jobs:
         if: matrix.os == 'ubuntu-20.04'
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: ArduinoCreateAgent-${{ matrix.platform-name }}-${{ matrix.arch }}
           path: ArduinoCreateAgent*
@@ -456,7 +456,7 @@ jobs:
     
     steps:
       - name: Download artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: ArduinoCreateAgent-windows-${{ matrix.arch }}
       
@@ -472,7 +472,7 @@ jobs:
           "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
           name: ArduinoCreateAgent-windows-${{ matrix.arch }}-signed
@@ -494,7 +494,7 @@ jobs:
           token: ${{ secrets.ARDUINO_CREATE_AGENT_CI_PAT }}
 
       - name: Download artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: ArduinoCreateAgent.app_${{ matrix.arch }}_notarized
           path: ArduinoCreateAgent.app
@@ -570,7 +570,7 @@ jobs:
         run: tar -cvf ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.tar ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg
 
       - name: Upload artifacts
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: ArduinoCreateAgent-osx-${{ matrix.arch }}
           path: ArduinoCreateAgent*.tar
@@ -588,7 +588,7 @@ jobs:
           fetch-depth: 0 # fetch all history for the create changelog step to work properly
 
       - name: Download artifact
-        uses: actions/download-artifact@v3 # download all the artifacts
+        uses: actions/download-artifact@v4 # download all the artifacts
 
       #  mandatory step because upload-release-action does not support multiple folders
       - name: prepare artifacts for the release
diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml
index d0a553526..184a42077 100644
--- a/.github/workflows/sync-labels.yml
+++ b/.github/workflows/sync-labels.yml
@@ -71,13 +71,13 @@ jobs:
           file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
 
       - name: Pass configuration files to next job via workflow artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           path: |
             *.yaml
             *.yml
           if-no-files-found: error
-          name: ${{ env.CONFIGURATIONS_ARTIFACT }}
+          name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}
 
   sync:
     needs: download
@@ -109,10 +109,11 @@ jobs:
         uses: actions/checkout@v4
 
       - name: Download configuration files artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
-          name: ${{ env.CONFIGURATIONS_ARTIFACT }}
+          pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-* # Download all configuration files
           path: ${{ env.CONFIGURATIONS_FOLDER }}
+          merge-multiple: true
 
       - name: Remove unneeded artifact
         uses: geekyeggo/delete-artifact@v5

From 0b9b35e40e8cd10eb376bdc53c691d6786e98d9b Mon Sep 17 00:00:00 2001
From: David Anson 
Date: Sat, 18 May 2024 17:50:49 -0700
Subject: [PATCH 17/51] Fix spelling of the word "development" in README.md.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 7f7100b5e..7356117d8 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ The documentation has been moved to the [wiki](https://github.com/arduino/arduin
 
 - [Advanced usage](https://github.com/arduino/arduino-create-agent/wiki/Advanced-usage): explaining how to use multiple configurations and how to use the agent with a proxy.
 - [Agent Beta Program](https://github.com/arduino/arduino-create-agent/wiki/Agent-Beta-Program)
-- [Developement](https://github.com/arduino/arduino-create-agent/wiki/Developement): containing useful info to help in development
+- [Development](https://github.com/arduino/arduino-create-agent/wiki/Developement): containing useful info to help in development
 - [Disable Autostart](https://github.com/arduino/arduino-create-agent/wiki/Disable-Autostart)
 - [How to compile on Raspberry Pi](https://github.com/arduino/arduino-create-agent/wiki/How-to-compile-on-Raspberry-Pi)
 - [How to use crashreport functionality](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality)

From 6220828536b2de00eb2f7daabfffe45183e75234 Mon Sep 17 00:00:00 2001
From: Alby <30591904+Xayton@users.noreply.github.com>
Date: Thu, 23 May 2024 18:07:26 +0200
Subject: [PATCH 18/51] Update README.md "Development" link (#959)

Update a wrong link (https://github.com/arduino/arduino-create-agent/wiki/Development), so that we can remove the wrong page in the Wiki.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 7356117d8..5c97939b6 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ The documentation has been moved to the [wiki](https://github.com/arduino/arduin
 
 - [Advanced usage](https://github.com/arduino/arduino-create-agent/wiki/Advanced-usage): explaining how to use multiple configurations and how to use the agent with a proxy.
 - [Agent Beta Program](https://github.com/arduino/arduino-create-agent/wiki/Agent-Beta-Program)
-- [Development](https://github.com/arduino/arduino-create-agent/wiki/Developement): containing useful info to help in development
+- [Development](https://github.com/arduino/arduino-create-agent/wiki/Development): containing useful info to help in development
 - [Disable Autostart](https://github.com/arduino/arduino-create-agent/wiki/Disable-Autostart)
 - [How to compile on Raspberry Pi](https://github.com/arduino/arduino-create-agent/wiki/How-to-compile-on-Raspberry-Pi)
 - [How to use crashreport functionality](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality)

From b02967edac710a5690857bd0fa8dbf6cd503dbf8 Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Mon, 17 Jun 2024 09:31:22 +0200
Subject: [PATCH 19/51] Add step to delete the signed exe on the self-hosted
 runner (#965)

---
 .github/workflows/release.yml | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ce3caa1b7..f149c8eb9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -132,7 +132,7 @@ jobs:
       - name: Create autoupdate files for win32
         run: go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
         if: matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
-      
+
       - name: configure aws credentials
         uses: aws-actions/configure-aws-credentials@v4
         with:
@@ -311,7 +311,7 @@ jobs:
         run: |
           wget -q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
           unzip gon_macos.zip -d /usr/local/bin
-  
+
       - name: Write gon config to file
         run: |
           cat > "${{ env.GON_CONFIG_PATH }}" < ${{ env.INSTALLER_CERT_WINDOWS_CER}}
 
@@ -468,7 +468,7 @@ jobs:
           CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
           CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
           # https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
-        run: | 
+        run: |
           "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
 
       - name: Upload artifacts
@@ -478,6 +478,10 @@ jobs:
           name: ArduinoCreateAgent-windows-${{ matrix.arch }}-signed
           path: ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
 
+        # This step is needed because the self hosted runner does not delete files automatically
+      - name: Clean up EXE
+        run: rm ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
+
   # This job will generate a dmg mac installer, sign/notarize it.
   generate-sign-dmg:
     needs: notarize-macos

From 04414e26c0d8cf0795d02c364637c3bb3f218bd4 Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Tue, 2 Jul 2024 09:31:09 +0200
Subject: [PATCH 20/51] Check if a signed URL is specified and use it download
 tools (#953)

* Wrap v2 tools install function inside tools.Download

* Download tools defaulting to the replace behaviour

* Improve archive renamer and fix failing tests

* Find the correct tool and system when `version=latest` is specified

* Reintroduce caching option when downloading tools
---
 tools/download.go      | 170 ++++-------------------------------------
 tools/download_test.go |  24 +++---
 tools/tools.go         |  12 ---
 v2/http.go             |   2 +-
 v2/pkgs/tools.go       | 137 ++++++++++++++++++++++++++-------
 v2/pkgs/tools_test.go  |   8 +-
 6 files changed, 142 insertions(+), 211 deletions(-)

diff --git a/tools/download.go b/tools/download.go
index 360d6e4c3..6e5fa8b7f 100644
--- a/tools/download.go
+++ b/tools/download.go
@@ -16,43 +16,18 @@
 package tools
 
 import (
-	"bytes"
 	"context"
-	"crypto/sha256"
-	"encoding/hex"
-	"encoding/json"
 	"errors"
-	"fmt"
-	"io"
-	"net/http"
 	"os"
 	"os/exec"
 	"path/filepath"
 	"runtime"
 
+	"github.com/arduino/arduino-create-agent/gen/tools"
+	"github.com/arduino/arduino-create-agent/utilities"
 	"github.com/arduino/arduino-create-agent/v2/pkgs"
-	"github.com/arduino/go-paths-helper"
-	"github.com/blang/semver"
-	"github.com/codeclysm/extract/v3"
 )
 
-// public vars to allow override in the tests
-var (
-	OS   = runtime.GOOS
-	Arch = runtime.GOARCH
-)
-
-func pathExists(path string) bool {
-	_, err := os.Stat(path)
-	if err == nil {
-		return true
-	}
-	if os.IsNotExist(err) {
-		return false
-	}
-	return true
-}
-
 // Download will parse the index at the indexURL for the tool to download.
 // It will extract it in a folder in .arduino-create, and it will update the
 // Installed map.
@@ -70,97 +45,21 @@ func pathExists(path string) bool {
 // if it already exists.
 func (t *Tools) Download(pack, name, version, behaviour string) error {
 
-	body, err := t.index.Read()
-	if err != nil {
-		return err
-	}
-
-	var data pkgs.Index
-	json.Unmarshal(body, &data)
-
-	// Find the tool by name
-	correctTool, correctSystem := findTool(pack, name, version, data)
-
-	if correctTool.Name == "" || correctSystem.URL == "" {
-		t.logger("We couldn't find a tool with the name " + name + " and version " + version + " packaged by " + pack)
-		return nil
-	}
-
-	key := correctTool.Name + "-" + correctTool.Version
-
-	// Check if it already exists
-	if behaviour == "keep" {
-		location, ok := t.getMapValue(key)
-		if ok && pathExists(location) {
-			// overwrite the default tool with this one
-			t.setMapValue(correctTool.Name, location)
-			t.logger("The tool is already present on the system")
-			return t.writeMap()
-		}
-	}
-
-	// Download the tool
-	t.logger("Downloading tool " + name + " from " + correctSystem.URL)
-	resp, err := http.Get(correctSystem.URL)
+	tool := pkgs.New(t.index, t.directory.String(), behaviour)
+	_, err := tool.Install(context.Background(), &tools.ToolPayload{Name: name, Version: version, Packager: pack})
 	if err != nil {
 		return err
 	}
-	defer resp.Body.Close()
-
-	// Read the body
-	body, err = io.ReadAll(resp.Body)
-	if err != nil {
-		return err
-	}
-
-	// Checksum
-	checksum := sha256.Sum256(body)
-	checkSumString := "SHA-256:" + hex.EncodeToString(checksum[:sha256.Size])
-
-	if checkSumString != correctSystem.Checksum {
-		return errors.New("checksum doesn't match")
-	}
-
-	tempPath := paths.TempDir()
-	// Create a temporary dir to extract package
-	if err := tempPath.MkdirAll(); err != nil {
-		return fmt.Errorf("creating temp dir for extraction: %s", err)
-	}
-	tempDir, err := tempPath.MkTempDir("package-")
-	if err != nil {
-		return fmt.Errorf("creating temp dir for extraction: %s", err)
-	}
-	defer tempDir.RemoveAll()
 
-	t.logger("Unpacking tool " + name)
-	ctx := context.Background()
-	reader := bytes.NewReader(body)
-	// Extract into temp directory
-	if err := extract.Archive(ctx, reader, tempDir.String(), nil); err != nil {
-		return fmt.Errorf("extracting archive: %s", err)
-	}
-
-	location := t.directory.Join(pack, correctTool.Name, correctTool.Version)
-	err = location.RemoveAll()
+	path := filepath.Join(pack, name, version)
+	safePath, err := utilities.SafeJoin(t.directory.String(), path)
 	if err != nil {
 		return err
 	}
 
-	// Check package content and find package root dir
-	root, err := findPackageRoot(tempDir)
-	if err != nil {
-		return fmt.Errorf("searching package root dir: %s", err)
-	}
-
-	if err := root.Rename(location); err != nil {
-		if err := root.CopyDirTo(location); err != nil {
-			return fmt.Errorf("moving extracted archive to destination dir: %s", err)
-		}
-	}
-
 	// if the tool contains a post_install script, run it: it means it is a tool that needs to install drivers
 	// AFAIK this is only the case for the windows-driver tool
-	err = t.installDrivers(location.String())
+	err = t.installDrivers(safePath)
 	if err != nil {
 		return err
 	}
@@ -169,55 +68,12 @@ func (t *Tools) Download(pack, name, version, behaviour string) error {
 	t.logger("Ensure that the files are executable")
 
 	// Update the tool map
-	t.logger("Updating map with location " + location.String())
-
-	t.setMapValue(name, location.String())
-	t.setMapValue(name+"-"+correctTool.Version, location.String())
-	return t.writeMap()
-}
+	t.logger("Updating map with location " + safePath)
 
-func findPackageRoot(parent *paths.Path) (*paths.Path, error) {
-	files, err := parent.ReadDir()
-	if err != nil {
-		return nil, fmt.Errorf("reading package root dir: %s", err)
-	}
-	files.FilterOutPrefix("__MACOSX")
+	t.setMapValue(name, safePath)
+	t.setMapValue(name+"-"+version, safePath)
 
-	// if there is only one dir, it is the root dir
-	if len(files) == 1 && files[0].IsDir() {
-		return files[0], nil
-	}
-	return parent, nil
-}
-
-func findTool(pack, name, version string, data pkgs.Index) (pkgs.Tool, pkgs.System) {
-	var correctTool pkgs.Tool
-	correctTool.Version = "0.0"
-
-	for _, p := range data.Packages {
-		if p.Name != pack {
-			continue
-		}
-		for _, t := range p.Tools {
-			if version != "latest" {
-				if t.Name == name && t.Version == version {
-					correctTool = t
-				}
-			} else {
-				// Find latest
-				v1, _ := semver.Make(t.Version)
-				v2, _ := semver.Make(correctTool.Version)
-				if t.Name == name && v1.Compare(v2) > 0 {
-					correctTool = t
-				}
-			}
-		}
-	}
-
-	// Find the url based on system
-	correctSystem := correctTool.GetFlavourCompatibleWith(OS, Arch)
-
-	return correctTool, correctSystem
+	return nil
 }
 
 func (t *Tools) installDrivers(location string) error {
@@ -225,7 +81,7 @@ func (t *Tools) installDrivers(location string) error {
 	extension := ".bat"
 	// add .\ to force locality
 	preamble := ".\\"
-	if OS != "windows" {
+	if runtime.GOOS != "windows" {
 		extension = ".sh"
 		// add ./ to force locality
 		preamble = "./"
@@ -237,7 +93,7 @@ func (t *Tools) installDrivers(location string) error {
 			os.Chdir(location)
 			t.logger(preamble + "post_install" + extension)
 			oscmd := exec.Command(preamble + "post_install" + extension)
-			if OS != "linux" {
+			if runtime.GOOS != "linux" {
 				// spawning a shell could be the only way to let the user type his password
 				TellCommandNotToSpawnShell(oscmd)
 			}
diff --git a/tools/download_test.go b/tools/download_test.go
index c45914b51..1e958de91 100644
--- a/tools/download_test.go
+++ b/tools/download_test.go
@@ -42,8 +42,8 @@ func TestDownloadCorrectPlatform(t *testing.T) {
 		{"linux", "arm", "arm-linux-gnueabihf"},
 	}
 	defer func() {
-		OS = runtime.GOOS     // restore `runtime.OS`
-		Arch = runtime.GOARCH // restore `runtime.ARCH`
+		pkgs.OS = runtime.GOOS     // restore `runtime.OS`
+		pkgs.Arch = runtime.GOARCH // restore `runtime.ARCH`
 	}()
 	testIndex := paths.New("testdata", "test_tool_index.json")
 	buf, err := testIndex.ReadFile()
@@ -54,10 +54,11 @@ func TestDownloadCorrectPlatform(t *testing.T) {
 	require.NoError(t, err)
 	for _, tc := range testCases {
 		t.Run(tc.hostOS+tc.hostArch, func(t *testing.T) {
-			OS = tc.hostOS     // override `runtime.OS` for testing purposes
-			Arch = tc.hostArch // override `runtime.ARCH` for testing purposes
+			pkgs.OS = tc.hostOS     // override `runtime.OS` for testing purposes
+			pkgs.Arch = tc.hostArch // override `runtime.ARCH` for testing purposes
 			// Find the tool by name
-			correctTool, correctSystem := findTool("arduino-test", "arduino-fwuploader", "2.2.2", data)
+			correctTool, correctSystem, found := pkgs.FindTool("arduino-test", "arduino-fwuploader", "2.2.2", data)
+			require.True(t, found)
 			require.NotNil(t, correctTool)
 			require.NotNil(t, correctSystem)
 			require.Equal(t, correctTool.Name, "arduino-fwuploader")
@@ -78,8 +79,8 @@ func TestDownloadFallbackPlatform(t *testing.T) {
 		{"windows", "amd64", "i686-mingw32"},
 	}
 	defer func() {
-		OS = runtime.GOOS     // restore `runtime.OS`
-		Arch = runtime.GOARCH // restore `runtime.ARCH`
+		pkgs.OS = runtime.GOOS     // restore `runtime.OS`
+		pkgs.Arch = runtime.GOARCH // restore `runtime.ARCH`
 	}()
 	testIndex := paths.New("testdata", "test_tool_index.json")
 	buf, err := testIndex.ReadFile()
@@ -90,10 +91,11 @@ func TestDownloadFallbackPlatform(t *testing.T) {
 	require.NoError(t, err)
 	for _, tc := range testCases {
 		t.Run(tc.hostOS+tc.hostArch, func(t *testing.T) {
-			OS = tc.hostOS     // override `runtime.OS` for testing purposes
-			Arch = tc.hostArch // override `runtime.ARCH` for testing purposes
+			pkgs.OS = tc.hostOS     // override `runtime.OS` for testing purposes
+			pkgs.Arch = tc.hostArch // override `runtime.ARCH` for testing purposes
 			// Find the tool by name
-			correctTool, correctSystem := findTool("arduino-test", "arduino-fwuploader", "2.2.0", data)
+			correctTool, correctSystem, found := pkgs.FindTool("arduino-test", "arduino-fwuploader", "2.2.0", data)
+			require.True(t, found)
 			require.NotNil(t, correctTool)
 			require.NotNil(t, correctSystem)
 			require.Equal(t, correctTool.Name, "arduino-fwuploader")
@@ -145,7 +147,7 @@ func TestDownload(t *testing.T) {
 				if filePath.IsDir() {
 					require.DirExists(t, filePath.String())
 				} else {
-					if OS == "windows" {
+					if runtime.GOOS == "windows" {
 						require.FileExists(t, filePath.String()+".exe")
 					} else {
 						require.FileExists(t, filePath.String())
diff --git a/tools/tools.go b/tools/tools.go
index e641db351..cb9efc787 100644
--- a/tools/tools.go
+++ b/tools/tools.go
@@ -78,18 +78,6 @@ func (t *Tools) getMapValue(key string) (string, bool) {
 	return value, ok
 }
 
-// writeMap() writes installed map to the json file "installed.json"
-func (t *Tools) writeMap() error {
-	t.mutex.RLock()
-	defer t.mutex.RUnlock()
-	b, err := json.Marshal(t.installed)
-	if err != nil {
-		return err
-	}
-	filePath := t.directory.Join("installed.json")
-	return filePath.WriteFile(b)
-}
-
 // readMap() reads the installed map from json file "installed.json"
 func (t *Tools) readMap() error {
 	t.mutex.Lock()
diff --git a/v2/http.go b/v2/http.go
index bcfbc82aa..390ec3989 100644
--- a/v2/http.go
+++ b/v2/http.go
@@ -40,7 +40,7 @@ func Server(directory string, index *index.Resource) http.Handler {
 	logAdapter := LogAdapter{Logger: logger}
 
 	// Mount tools
-	toolsSvc := pkgs.New(index, directory)
+	toolsSvc := pkgs.New(index, directory, "replace")
 	toolsEndpoints := toolssvc.NewEndpoints(toolsSvc)
 	toolsServer := toolssvr.New(toolsEndpoints, mux, CustomRequestDecoder, goahttp.ResponseEncoder, errorHandler(logger), nil)
 	toolssvr.Mount(mux, toolsServer)
diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go
index 55ff6c2e4..b0daaaaef 100644
--- a/v2/pkgs/tools.go
+++ b/v2/pkgs/tools.go
@@ -33,9 +33,16 @@ import (
 	"github.com/arduino/arduino-create-agent/gen/tools"
 	"github.com/arduino/arduino-create-agent/index"
 	"github.com/arduino/arduino-create-agent/utilities"
+	"github.com/blang/semver"
 	"github.com/codeclysm/extract/v3"
 )
 
+// public vars to allow override in the tests
+var (
+	OS   = runtime.GOOS
+	Arch = runtime.GOARCH
+)
+
 // Tools is a client that implements github.com/arduino/arduino-create-agent/gen/tools.Service interface.
 // It saves tools in a specified folder with this structure: packager/name/version
 // For example:
@@ -50,17 +57,19 @@ import (
 //
 // It requires an Index Resource to search for tools
 type Tools struct {
-	index  *index.Resource
-	folder string
+	index     *index.Resource
+	folder    string
+	behaviour string
 }
 
 // New will return a Tool object, allowing the caller to execute operations on it.
 // The New function will accept an index as parameter (used to download the indexes)
 // and a folder used to download the indexes
-func New(index *index.Resource, folder string) *Tools {
+func New(index *index.Resource, folder, behaviour string) *Tools {
 	return &Tools{
-		index:  index,
-		folder: folder,
+		index:     index,
+		folder:    folder,
+		behaviour: behaviour,
 	}
 }
 
@@ -166,21 +175,28 @@ func (t *Tools) Install(ctx context.Context, payload *tools.ToolPayload) (*tools
 	var index Index
 	json.Unmarshal(body, &index)
 
-	for _, packager := range index.Packages {
-		if packager.Name != payload.Packager {
-			continue
-		}
-
-		for _, tool := range packager.Tools {
-			if tool.Name == payload.Name &&
-				tool.Version == payload.Version {
-
-				sys := tool.GetFlavourCompatibleWith(runtime.GOOS, runtime.GOARCH)
+	correctTool, correctSystem, found := FindTool(payload.Packager, payload.Name, payload.Version, index)
+	path = filepath.Join(payload.Packager, correctTool.Name, correctTool.Version)
 
-				return t.install(ctx, path, sys.URL, sys.Checksum)
+	key := correctTool.Name + "-" + correctTool.Version
+	// Check if it already exists
+	if t.behaviour == "keep" && pathExists(t.folder) {
+		location, ok, err := checkInstalled(t.folder, key)
+		if err != nil {
+			return nil, err
+		}
+		if ok && pathExists(location) {
+			// overwrite the default tool with this one
+			err := writeInstalled(t.folder, path)
+			if err != nil {
+				return nil, err
 			}
+			return &tools.Operation{Status: "ok"}, nil
 		}
 	}
+	if found {
+		return t.install(ctx, path, correctSystem.URL, correctSystem.Checksum)
+	}
 
 	return nil, tools.MakeNotFound(
 		fmt.Errorf("tool not found with packager '%s', name '%s', version '%s'",
@@ -256,27 +272,51 @@ func (t *Tools) Remove(ctx context.Context, payload *tools.ToolPayload) (*tools.
 func rename(base string) extract.Renamer {
 	return func(path string) string {
 		parts := strings.Split(filepath.ToSlash(path), "/")
-		path = strings.Join(parts[1:], "/")
-		path = filepath.Join(base, path)
+		newPath := strings.Join(parts[1:], "/")
+		if newPath == "" {
+			newPath = filepath.Join(newPath, path)
+		}
+		path = filepath.Join(base, newPath)
 		return path
 	}
 }
 
-func writeInstalled(folder, path string) error {
+func readInstalled(installedFile string) (map[string]string, error) {
 	// read installed.json
 	installed := map[string]string{}
-
-	installedFile, err := utilities.SafeJoin(folder, "installed.json")
-	if err != nil {
-		return err
-	}
 	data, err := os.ReadFile(installedFile)
 	if err == nil {
 		err = json.Unmarshal(data, &installed)
 		if err != nil {
-			return err
+			return nil, err
 		}
 	}
+	return installed, nil
+}
+
+func checkInstalled(folder, key string) (string, bool, error) {
+	installedFile, err := utilities.SafeJoin(folder, "installed.json")
+	if err != nil {
+		return "", false, err
+	}
+	installed, err := readInstalled(installedFile)
+	if err != nil {
+		return "", false, err
+	}
+	location, ok := installed[key]
+	return location, ok, err
+}
+
+func writeInstalled(folder, path string) error {
+	// read installed.json
+	installedFile, err := utilities.SafeJoin(folder, "installed.json")
+	if err != nil {
+		return err
+	}
+	installed, err := readInstalled(installedFile)
+	if err != nil {
+		return err
+	}
 
 	parts := strings.Split(path, string(filepath.Separator))
 	tool := parts[len(parts)-2]
@@ -288,10 +328,55 @@ func writeInstalled(folder, path string) error {
 	installed[tool] = toolFile
 	installed[toolWithVersion] = toolFile
 
-	data, err = json.Marshal(installed)
+	data, err := json.Marshal(installed)
 	if err != nil {
 		return err
 	}
 
 	return os.WriteFile(installedFile, data, 0644)
 }
+
+func pathExists(path string) bool {
+	_, err := os.Stat(path)
+	if err == nil {
+		return true
+	}
+	if os.IsNotExist(err) {
+		return false
+	}
+	return true
+}
+
+// FindTool searches the index for the correct tool and system that match the specified tool name and version
+func FindTool(pack, name, version string, data Index) (Tool, System, bool) {
+	var correctTool Tool
+	correctTool.Version = "0.0"
+	found := false
+
+	for _, p := range data.Packages {
+		if p.Name != pack {
+			continue
+		}
+		for _, t := range p.Tools {
+			if version != "latest" {
+				if t.Name == name && t.Version == version {
+					correctTool = t
+					found = true
+				}
+			} else {
+				// Find latest
+				v1, _ := semver.Make(t.Version)
+				v2, _ := semver.Make(correctTool.Version)
+				if t.Name == name && v1.Compare(v2) > 0 {
+					correctTool = t
+					found = true
+				}
+			}
+		}
+	}
+
+	// Find the url based on system
+	correctSystem := correctTool.GetFlavourCompatibleWith(OS, Arch)
+
+	return correctTool, correctSystem, found
+}
diff --git a/v2/pkgs/tools_test.go b/v2/pkgs/tools_test.go
index 78c56398f..be4d5e4d1 100644
--- a/v2/pkgs/tools_test.go
+++ b/v2/pkgs/tools_test.go
@@ -45,7 +45,7 @@ func TestTools(t *testing.T) {
 	// Instantiate Index
 	Index := index.Init(indexURL, config.GetDataDir())
 
-	service := pkgs.New(Index, tmp)
+	service := pkgs.New(Index, tmp, "replace")
 
 	ctx := context.Background()
 
@@ -126,7 +126,7 @@ func TestEvilFilename(t *testing.T) {
 	// Instantiate Index
 	Index := index.Init(indexURL, config.GetDataDir())
 
-	service := pkgs.New(Index, tmp)
+	service := pkgs.New(Index, tmp, "replace")
 
 	ctx := context.Background()
 
@@ -195,7 +195,7 @@ func TestInstalledHead(t *testing.T) {
 	// Instantiate Index
 	Index := index.Init(indexURL, config.GetDataDir())
 
-	service := pkgs.New(Index, tmp)
+	service := pkgs.New(Index, tmp, "replace")
 
 	ctx := context.Background()
 
@@ -216,7 +216,7 @@ func TestInstall(t *testing.T) {
 		LastRefresh: time.Now(),
 	}
 
-	tool := pkgs.New(testIndex, tmp)
+	tool := pkgs.New(testIndex, tmp, "replace")
 
 	ctx := context.Background()
 

From da1fa2e1dfc896754901087bddfd7e8b3a3efc03 Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Wed, 10 Jul 2024 10:05:54 +0200
Subject: [PATCH 21/51] Create a single universal executable for macOS (#964)

* Create a single universal executable for macos

* Update docs on macOS support

* Add macos-arm64 to the test builds

* Check that the new executable exists and is in the right path before proceding with the update
---
 .github/workflows/publish-go-tester-task.yml | 29 +++++++++++++++++---
 .github/workflows/release.yml                | 25 +++++++++++++++--
 README.md                                    |  4 +--
 Taskfile.yml                                 |  3 +-
 updater/updater_darwin.go                    |  2 +-
 5 files changed, 51 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml
index 66b381643..54d9c04f0 100644
--- a/.github/workflows/publish-go-tester-task.yml
+++ b/.github/workflows/publish-go-tester-task.yml
@@ -30,6 +30,7 @@ on:
   repository_dispatch:
 
 env:
+  PROJECT_NAME: arduino-create-agent
   GO_VERSION: "1.21"
 
 jobs:
@@ -119,18 +120,38 @@ jobs:
         run: task go:build-win # GOARCH=amd64 by default on the runners
         if: runner.os == 'Windows' && matrix.arch == '-amd64'
 
-      - name: Build the Agent for macos
+      - name: Build the Agent for macos amd 64
         env:
           MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
           CGO_CFLAGS: -mmacosx-version-min=10.15
           CGO_LDFLAGS: -mmacosx-version-min=10.15
-        run: task go:build
+        run: |
+          task go:build
+          mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64
+        if: runner.os == 'macOS'
+
+      - name: Build the Agent for macos amd 64
+        env:
+          MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
+          CGO_CFLAGS: -mmacosx-version-min=10.15
+          CGO_LDFLAGS: -mmacosx-version-min=10.15
+          GOARCH: arm64
+          CGO_ENABLED: 1
+        run: |
+          task go:build
+          mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_arm64
+        if: runner.os == 'macOS'
+
+      - name: Create universal macos executable
+        run: |
+          lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
+          rm ${{ env.PROJECT_NAME}}_amd64 ${{ env.PROJECT_NAME}}_arm64
         if: runner.os == 'macOS'
 
       - name: Upload artifacts
         uses: actions/upload-artifact@v4
         with:
-          name: arduino-create-agent-${{ matrix.os }}${{ matrix.arch }}
+          name: ${{ env.PROJECT_NAME}}-${{ matrix.os }}${{ matrix.arch }}
           path: |
-            arduino-create-agent*
+            ${{ env.PROJECT_NAME}}*
           if-no-files-found: error
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f149c8eb9..72b07c468 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -107,13 +107,33 @@ jobs:
         run: task go:build-win # GOARCH=amd64 by default on the runners
         if: matrix.os == 'windows-2019' && matrix.arch == 'amd64'
 
-      - name: Build the Agent for macos
+      - name: Build the Agent for macos amd64
         env:
           CGO_ENABLED: 1
           MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
           CGO_CFLAGS: -mmacosx-version-min=10.15
           CGO_LDFLAGS: -mmacosx-version-min=10.15
-        run: task go:build
+        run: |
+          task go:build
+          mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64
+        if: matrix.os == 'macos-12'
+
+      - name: Build the Agent for macos arm64
+        env:
+          CGO_ENABLED: 1
+          MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
+          CGO_CFLAGS: -mmacosx-version-min=10.15
+          CGO_LDFLAGS: -mmacosx-version-min=10.15
+          GOARCH: arm64
+        run: |
+          task go:build
+          mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_arm64
+        if: matrix.os == 'macos-12'
+
+      - name: Create universal macos executable
+        run: |
+          lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64
+          rm ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64
         if: matrix.os == 'macos-12'
 
         # this will create `public/` dir with compressed full bin (/-.gz) and a json file
@@ -121,7 +141,6 @@ jobs:
         run: go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
         if: matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
 
-        # for now we do not distribute m1 build, this is a workaround for now
       - name: Copy autoupdate file for darwin-arm64 (m1 arch)
         working-directory: public/
         run: |
diff --git a/README.md b/README.md
index 5c97939b6..a2efe270a 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Get the [latest version](https://github.com/arduino/arduino-create-agent/release
 ## Apple silicon support
 
 The Arduino Agent is supported both on Intel and Apple silicon computers. This includes devices with the M1, M2 and M3 processors.  
-At the moment the Arduino Agent is only built for Intel architectures, but Apple silicon devices can run it thanks to the [Rosetta 2](https://support.apple.com/en-us/HT211861) translation layer by Apple.
+The Arduino Agent is built both for Intel architectures and Apple silicon devices, but distributed as a single universal executable for macOS.
 
 ## Documentation
 
@@ -50,7 +50,7 @@ The documentation has been moved to the [wiki](https://github.com/arduino/arduin
 
 ### Submitting an issue
 
-When submitting a new issue please search for duplicates before creating a new one. Help us by providing  useful context and information. Please attach the output of the commands running at the debug console or attach [crash reports](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality) if useful.
+When submitting a new issue please search for duplicates before creating a new one. Help us by providing useful context and information. Please attach the output of the commands running at the debug console or attach [crash reports](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality) if useful.
 
 #### Security
 
diff --git a/Taskfile.yml b/Taskfile.yml
index 6b7852762..603a2ce91 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -84,7 +84,7 @@ tasks:
     cmds:
       - poetry run pytest tests
 
-   # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
+    # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
   poetry:install-deps:
     desc: Install dependencies managed by Poetry
     cmds:
@@ -138,7 +138,6 @@ tasks:
       - task: go:vet
       - task: go:lint
 
-      
 vars:
   # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/release-go-task/Taskfile.yml
   PROJECT_NAME: arduino-create-agent
diff --git a/updater/updater_darwin.go b/updater/updater_darwin.go
index ec00f88cc..105a529ef 100644
--- a/updater/updater_darwin.go
+++ b/updater/updater_darwin.go
@@ -143,7 +143,7 @@ func checkForUpdates(currentVersion string, updateURL string, cmdName string) (s
 
 	// Install new app
 	logrus.WithField("from", tmpAppPath).WithField("to", currentAppPath).Info("Copying updated app")
-	if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil {
+	if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil || !paths.New(executablePath).Exist() {
 		// Try rollback changes
 		_ = currentAppPath.RemoveAll()
 		_ = oldAppPath.Rename(currentAppPath)

From 46fbb343ee66a5a38bd716e59a1a96c43454b6a2 Mon Sep 17 00:00:00 2001
From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
Date: Wed, 17 Jul 2024 11:35:02 +0200
Subject: [PATCH 22/51] Rename executable and releases to `Arduino Cloud Agent`
 (#961)

* Change name in the docs

* Change executable's name

* Change debug console's name

* Update name in test release workflow

* Update name in release workflow

* Change name used in the installer

* Rename .app to Cloud Agent

* Check that either the Create Agent or the Cloud Agent exist when autoupdating on macos

* Fix typo

* Revert changes on the zipped notarized app bundle uploaded to s3

We are keeping it this way because it is used by the autoupdate procedure on macos
---
 .github/workflows/publish-go-tester-task.yml |   2 +-
 .github/workflows/release.yml                |  89 +--
 .gitignore                                   |   4 +-
 README.md                                    |   8 +-
 Taskfile.yml                                 |   8 +-
 home.html                                    | 627 ++++++++++---------
 tests/conftest.py                            |   4 +-
 updater/updater_darwin.go                    |   4 +-
 8 files changed, 387 insertions(+), 359 deletions(-)

diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml
index 54d9c04f0..aa2949e13 100644
--- a/.github/workflows/publish-go-tester-task.yml
+++ b/.github/workflows/publish-go-tester-task.yml
@@ -30,7 +30,7 @@ on:
   repository_dispatch:
 
 env:
-  PROJECT_NAME: arduino-create-agent
+  PROJECT_NAME: arduino-cloud-agent
   GO_VERSION: "1.21"
 
 jobs:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 72b07c468..fe60ec8f8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,7 +11,7 @@ permissions:
 
 env:
   # As defined by the Taskfile's PROJECT_NAME variable
-  PROJECT_NAME: arduino-create-agent
+  PROJECT_NAME: arduino-cloud-agent
   TARGET: "/CreateAgent/Stable/"
   VERSION_TARGET: "arduino-create-static/agent-metadata/"
   AWS_REGION: "us-east-1" # or https://github.com/aws/aws-cli/issues/5623
@@ -183,7 +183,7 @@ jobs:
 
     runs-on: macos-12
     env:
-      EXE_PATH: "skel/ArduinoCreateAgent.app/Contents/MacOS/"
+      EXE_PATH: "skel/ArduinoCloudAgent.app/Contents/MacOS/"
 
     steps:
       - name: Checkout
@@ -205,21 +205,21 @@ jobs:
       - name: Make executable
         run: chmod -v +x ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }}
 
-      - name: Rename executable to Arduino_Create_Agent
-        run: mv -v ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }} ${{ env.EXE_PATH }}Arduino_Create_Agent
+      - name: Rename executable to Arduino_Cloud_Agent
+        run: mv -v ${{ env.EXE_PATH }}${{ env.PROJECT_NAME }} ${{ env.EXE_PATH }}Arduino_Cloud_Agent
 
       - name: get year
         run: echo "YEAR=$(date "+%Y")" >> $GITHUB_ENV
 
       - name: Generate Info.plist for MacOS
         run: |
-          cat > skel/ArduinoCreateAgent.app/Contents/Info.plist < skel/ArduinoCloudAgent.app/Contents/Info.plist <CFBundlePackageTypeAPPLCFBundleInfoDictionaryVersion6.0
 
               CFBundleIconFile           AppIcon.icns
 
-              CFBundleName               Arduino Create Agent
-              CFBundleExecutable         Arduino_Create_Agent
+              CFBundleName               Arduino Cloud Agent
+              CFBundleExecutable         Arduino_Cloud_Agent
               CFBundleIdentifier         create.arduino.cc
 
               CFBundleVersion            ${GITHUB_REF##*/}
@@ -234,14 +234,14 @@ jobs:
           EOF
 
       - name: Tar bundle to keep permissions
-        run: tar -cvf ArduinoCreateAgent.app_${{ matrix.arch }}.tar -C skel/ .
+        run: tar -cvf ArduinoCloudAgent.app_${{ matrix.arch }}.tar -C skel/ .
 
       - name: Upload artifacts
         uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
-          name: ArduinoCreateAgent.app_${{ matrix.arch }}
-          path: ArduinoCreateAgent.app_${{ matrix.arch }}.tar
+          name: ArduinoCloudAgent.app_${{ matrix.arch }}
+          path: ArduinoCloudAgent.app_${{ matrix.arch }}.tar
 
   # The notarize-macos job will download the macos bundle from the previous job, sign, notarize and re-upload it, uploading it also on s3 download servers for the autoupdate.
   notarize-macos:
@@ -262,10 +262,10 @@ jobs:
       - name: Download artifact
         uses: actions/download-artifact@v4
         with:
-          name: ArduinoCreateAgent.app_${{ matrix.arch }}
+          name: ArduinoCloudAgent.app_${{ matrix.arch }}
 
       - name: un-Tar bundle
-        run: tar -xvf ArduinoCreateAgent.app_${{ matrix.arch }}.tar
+        run: tar -xvf ArduinoCloudAgent.app_${{ matrix.arch }}.tar
 
       - name: Import Code-Signing Certificates
         run: |
@@ -305,7 +305,7 @@ jobs:
         run: |
           cat > "${{ env.GON_CONFIG_PATH }}" < /tmp/license.xml
@@ -444,14 +445,14 @@ jobs:
         run: ${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.installbuilder-name }} --verbose --license /tmp/license.xml  --setvars ${{ env.INSTALLER_VARS }} architecture=${{ matrix.arch }}
 
       - name: Generate archive
-        run: tar -czvf ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCreateAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
+        run: tar -czvf ArduinoCloudAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCloudAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}}
         if: matrix.os == 'ubuntu-20.04'
 
       - name: Upload artifacts
         uses: actions/upload-artifact@v4
         with:
-          name: ArduinoCreateAgent-${{ matrix.platform-name }}-${{ matrix.arch }}
-          path: ArduinoCreateAgent*
+          name: ArduinoCloudAgent-${{ matrix.platform-name }}-${{ matrix.arch }}
+          path: ArduinoCloudAgent*
           if-no-files-found: error
 
   # This job will sign the Windows installer
@@ -477,7 +478,7 @@ jobs:
       - name: Download artifact
         uses: actions/download-artifact@v4
         with:
-          name: ArduinoCreateAgent-windows-${{ matrix.arch }}
+          name: ArduinoCloudAgent-windows-${{ matrix.arch }}
 
       - name: Save Win signing certificate to file
         run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
@@ -488,18 +489,18 @@ jobs:
           CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
           # https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
         run: |
-          "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
+          "${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Cloud Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCloudAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
 
       - name: Upload artifacts
         uses: actions/upload-artifact@v4
         with:
           if-no-files-found: error
-          name: ArduinoCreateAgent-windows-${{ matrix.arch }}-signed
-          path: ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
+          name: ArduinoCloudAgent-windows-${{ matrix.arch }}-signed
+          path: ArduinoCloudAgent-*-windows-${{ matrix.arch }}-installer.exe
 
         # This step is needed because the self hosted runner does not delete files automatically
       - name: Clean up EXE
-        run: rm ArduinoCreateAgent-*-windows-${{ matrix.arch }}-installer.exe
+        run: rm ArduinoCloudAgent-*-windows-${{ matrix.arch }}-installer.exe
 
   # This job will generate a dmg mac installer, sign/notarize it.
   generate-sign-dmg:
@@ -519,11 +520,11 @@ jobs:
       - name: Download artifact
         uses: actions/download-artifact@v4
         with:
-          name: ArduinoCreateAgent.app_${{ matrix.arch }}_notarized
-          path: ArduinoCreateAgent.app
+          name: ArduinoCloudAgent.app_${{ matrix.arch }}_notarized
+          path: ArduinoCloudAgent.app
 
       - name: unzip artifact
-        working-directory: ArduinoCreateAgent.app
+        working-directory: ArduinoCloudAgent.app
         run: |
           unzip ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
           rm ArduinoCreateAgent.app_${{ matrix.arch }}_notarized.zip
@@ -531,18 +532,18 @@ jobs:
       - name: Install create-dmg
         run: brew install create-dmg
 
-      - name: Genarate DMG
+      - name: Generate DMG
         run: |
           create-dmg \
-            --volname "ArduinoCreateAgent" \
+            --volname "ArduinoCloudAgent" \
             --background "installer_icons/background.tiff" \
             --window-pos 200 120 \
             --window-size 500 320 \
             --icon-size 80 \
-            --icon "ArduinoCreateAgent.app" 125 150 \
+            --icon "ArduinoCloudAgent.app" 125 150 \
             --app-drop-link 375 150 \
-            "ArduinoCreateAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
-            "ArduinoCreateAgent.app"
+            "ArduinoCloudAgent-${GITHUB_REF##*/}-osx-${{ matrix.arch }}-installer.dmg" \
+            "ArduinoCloudAgent.app"
 
       - name: Import Code-Signing Certificates
         run: |
@@ -572,7 +573,7 @@ jobs:
         # gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
         run: |
           cat > gon.config_installer.hcl <|                      +------------>|               |
-| |                           | |                | Arduino Create Agent |             | Arduino Board |
+| |                           | |                | Arduino Cloud Agent |             | Arduino Board |
 | | Arduino Create Web Editor | +--------------->|                      |<------------+               |
 | |                           | |   REST API     +----------------------+   serial    +---------------+
 | +---------------------------+ |
@@ -74,7 +74,7 @@ By signing off your commits, you agree to the following agreement, also known as
 
 ## Authors and acknowledgment
 
-arduino-create-agent is a fork of @[johnlauer](https://github.com/johnlauer)'s [serial-port-json-server](https://github.com/johnlauer/serial-port-json-server) (which we really want to thank for his kindness and great work)
+arduino-cloud-agent is a fork of @[johnlauer](https://github.com/johnlauer)'s [serial-port-json-server](https://github.com/johnlauer/serial-port-json-server) (which we really want to thank for his kindness and great work)
 
 The history has been rewritten to keep the repo small (thus removing all binaries committed in the past)
 
diff --git a/Taskfile.yml b/Taskfile.yml
index 603a2ce91..b64b12bb5 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -37,7 +37,7 @@ tasks:
     cmds:
       - task: go:build
         vars:
-          PROJECT_NAME: arduino-create-agent_cli
+          PROJECT_NAME: arduino-cloud-agent_cli
           ADDITIONAL_FLAGS: -tags cli
 
   go:build-win:
@@ -46,7 +46,7 @@ tasks:
       - rsrc -arch {{.GOARCH}} -manifest manifest.xml # GOARCH shoud be either amd64 or 386
       - task: go:build
         vars:
-          PROJECT_NAME: arduino-create-agent.exe
+          PROJECT_NAME: arduino-cloud-agent.exe
           WIN_FLAGS: -H=windowsgui
       - rm *.syso # rm file to avoid compilation problems on other platforms
     vars:
@@ -58,7 +58,7 @@ tasks:
     cmds:
       - task: go:build
         vars:
-          PROJECT_NAME: arduino-create-agent_cli.exe
+          PROJECT_NAME: arduino-cloud-agent_cli.exe
           ADDITIONAL_FLAGS: -tags cli
 
   # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
@@ -140,7 +140,7 @@ tasks:
 
 vars:
   # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/release-go-task/Taskfile.yml
-  PROJECT_NAME: arduino-create-agent
+  PROJECT_NAME: arduino-cloud-agent
   # build vars
   COMMIT:
     sh: echo "$(git log --no-show-signature -n 1 --format=%h)"
diff --git a/home.html b/home.html
index e66b7c975..ee523981a 100644
--- a/home.html
+++ b/home.html
@@ -1,321 +1,346 @@
 
 
-
-
-    Arduino Create Agent Debug Console
-    
-    
-    
+  
+    Arduino Cloud Agent Debug Console
+    
+    
+    
 
     
-    
-
+  
 
-
+  
     
-
-

-            

-        
- - - - \ No newline at end of file + + diff --git a/tests/conftest.py b/tests/conftest.py index 622965b64..0e81d76f0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,9 +27,9 @@ @pytest.fixture(scope="function") def agent(pytestconfig): if platform.system() == "Windows": - agent = str(Path(pytestconfig.rootdir) / "arduino-create-agent_cli.exe") + agent = str(Path(pytestconfig.rootdir) / "arduino-cloud-agent_cli.exe") else: - agent = str(Path(pytestconfig.rootdir) / "arduino-create-agent") + agent = str(Path(pytestconfig.rootdir) / "arduino-cloud-agent") env = { # "ARDUINO_DATA_DIR": data_dir, # "ARDUINO_DOWNLOADS_DIR": downloads_dir, diff --git a/updater/updater_darwin.go b/updater/updater_darwin.go index 105a529ef..c4eb5070d 100644 --- a/updater/updater_darwin.go +++ b/updater/updater_darwin.go @@ -143,7 +143,9 @@ func checkForUpdates(currentVersion string, updateURL string, cmdName string) (s // Install new app logrus.WithField("from", tmpAppPath).WithField("to", currentAppPath).Info("Copying updated app") - if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil || !paths.New(executablePath).Exist() { + createPath := currentAppPath.Join("Contents", "MacOS", "Arduino_Create_Agent") + cloudPath := currentAppPath.Join("Contents", "MacOS", "Arduino_Cloud_Agent") + if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil || (!createPath.Exist() && !cloudPath.Exist()) { // Try rollback changes _ = currentAppPath.RemoveAll() _ = oldAppPath.Rename(currentAppPath) From 6287df1e7a1611bf28569df49f493593b598cb4e Mon Sep 17 00:00:00 2001 From: Umberto Baldi <34278123+umbynos@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:01:59 +0200 Subject: [PATCH 23/51] Fix agent not able to install `esptool` after 1.6.0 (#986) * fix link * drop test on old tool not used anymore, and introduce again `arduino-fwuploader` * add tests to install esptool to verify https://github.com/arduino/arduino-create-agent/issues/980 * implement properly rename function to fix extraction issue with esptool * fix test * Update v2/pkgs/tools_test.go Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> --------- Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> --- main_test.go | 13 +++++++ tools/download_test.go | 1 - tools/testdata/test_tool_index.json | 55 --------------------------- v2/pkgs/pkgs.go | 8 ++-- v2/pkgs/testdata/test_tool_index.json | 55 --------------------------- v2/pkgs/tools.go | 14 ++++--- v2/pkgs/tools_test.go | 12 +++--- 7 files changed, 32 insertions(+), 126 deletions(-) diff --git a/main_test.go b/main_test.go index c8276bba8..568556953 100644 --- a/main_test.go +++ b/main_test.go @@ -116,6 +116,18 @@ func TestInstallToolV2(t *testing.T) { Signature: &bossacSignature, } + esptoolURL := "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.esptool-f80ae31.tar.gz" + esptoolChecksum := "SHA-256:bded1dca953377838b6086a9bcd40a1dc5286ba5f69f2372c22a1d1819baad24" + esptoolSignature := "852b58871419ce5e5633ecfaa72c0f0fa890ceb51164b362b8133bc0e3e003a21cec48935b8cdc078f4031219cbf17fb7edd9d7c9ca8ed85492911c9ca6353c9aa4691eb91fda99563a6bd49aeca0d9981fb05ec76e45c6024f8a6822862ad1e34ddc652fbbf4fa909887a255d4f087398ec386577efcec523c21203be3d10fc9e9b0f990a7536875a77dc2bc5cbffea7734b62238e31719111b718bacccebffc9be689545540e81d23b81caa66214376f58a0d6a45cf7efc5d3af62ab932b371628162fffe403906f41d5534921e5be081c5ac2ecc9db5caec03a105cc44b00ce19a95ad079843501eb8182e0717ce327867380c0e39d2b48698547fc1d0d66" + esptoolInstallURLOK := tools.ToolPayload{ + Name: "esptool", + Version: "2.5.0-3-20ed2b9", + Packager: "esp8266", + URL: &esptoolURL, + Checksum: &esptoolChecksum, + Signature: &esptoolSignature, + } + wrongSignature := "wr0ngs1gn4tur3" bossacInstallWrongSig := tools.ToolPayload{ Name: "bossac", @@ -147,6 +159,7 @@ func TestInstallToolV2(t *testing.T) { {bossacInstallWrongSig, http.StatusInternalServerError, "verification error"}, {bossacInstallWrongCheck, http.StatusInternalServerError, "checksum of downloaded file doesn't match"}, {bossacInstallNoURL, http.StatusOK, "ok"}, + {esptoolInstallURLOK, http.StatusOK, "ok"}, } for _, test := range tests { diff --git a/tools/download_test.go b/tools/download_test.go index 1e958de91..8863a09d7 100644 --- a/tools/download_test.go +++ b/tools/download_test.go @@ -120,7 +120,6 @@ func TestDownload(t *testing.T) { {"rp2040tools", "1.0.6", []string{"elf2uf2", "picotool", "pioasm", "rp2040load"}}, {"esptool_py", "4.5.1", []string{"esptool"}}, {"arduino-fwuploader", "2.2.2", []string{"arduino-fwuploader"}}, - {"fwupdater", "0.1.12", []string{"firmwares", "FirmwareUploader"}}, // old legacy tool } // prepare the test environment tempDir := t.TempDir() diff --git a/tools/testdata/test_tool_index.json b/tools/testdata/test_tool_index.json index fdee1cc9d..b7f8b87d2 100644 --- a/tools/testdata/test_tool_index.json +++ b/tools/testdata/test_tool_index.json @@ -514,61 +514,6 @@ "size": "6829396" } ] - }, - { - "name": "fwupdater", - "version": "0.1.12", - "systems": [ - { - "host": "i686-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_32bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_32bit.tar.bz2", - "checksum": "SHA-256:2fec2bdfd20ad4950bc9ba37108dc2a7c152f569174279c0697efe1f5a0db781", - "size": "26097546" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_64bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_64bit.tar.bz2", - "checksum": "SHA-256:ce57d0afef30cb7d3513f5da326346c99d6bf4923bbc2200634086811f3fb31e", - "size": "26073327" - }, - { - "host": "i686-mingw32", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Windows_32bit.zip", - "archiveFileName": "FirmwareUploader_0.1.12_Windows_32bit.zip", - "checksum": "SHA-256:558568b453caa1c821def8cc6d34555d0c910eb7e7e871de3ae1c39ae6f01bdd", - "size": "25743641" - }, - { - "host": "x86_64-mingw32", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Windows_64bit.zip", - "archiveFileName": "FirmwareUploader_0.1.12_Windows_64bit.zip", - "checksum": "SHA-256:ec16de33620985434280c92c3c322257b89bb67adf8fd4d5dd5f9467ea1e9e40", - "size": "25851428" - }, - { - "host": "i386-apple-darwin11", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_macOS_64bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_macOS_64bit.tar.bz2", - "checksum": "SHA-256:a470361b57f86ddfcaecd274d844af51ee1d23a71cd6c26e30fcef2152d1a03f", - "size": "25792860" - }, - { - "host": "arm-linux-gnueabihf", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_ARM.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_ARM.tar.bz2", - "checksum": "SHA-256:855fa0a9b942c3ee18906efc510bdfe30bf3334ff28ffbb476e648ff30033847", - "size": "25936245" - }, - { - "host": "aarch64-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_ARM64.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_ARM64.tar.bz2", - "checksum": "SHA-256:691461e64fe075e9a79801347c2bd895fb72f8f2c45a7cd49056c6ad9efe8fc4", - "size": "25967430" - } - ] } ] } diff --git a/v2/pkgs/pkgs.go b/v2/pkgs/pkgs.go index f4965117c..07e392b2f 100644 --- a/v2/pkgs/pkgs.go +++ b/v2/pkgs/pkgs.go @@ -50,7 +50,7 @@ type System struct { Checksum string `json:"checksum"` } -// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L129-L142 +// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L129-L142 var ( regexpLinuxArm = regexp.MustCompile("arm.*-linux-gnueabihf") regexpLinuxArm64 = regexp.MustCompile("(aarch64|arm64)-linux-gnu") @@ -66,7 +66,7 @@ var ( regexpFreeBSD64 = regexp.MustCompile("amd64-freebsd[0-9]*") ) -// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L144-L176 +// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L144-L176 func (s *System) isExactMatchWith(osName, osArch string) bool { if s.Host == "all" { return true @@ -101,7 +101,7 @@ func (s *System) isExactMatchWith(osName, osArch string) bool { return false } -// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L178-L198 +// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L178-L198 func (s *System) isCompatibleWith(osName, osArch string) (bool, int) { if s.isExactMatchWith(osName, osArch) { return true, 1000 @@ -125,7 +125,7 @@ func (s *System) isCompatibleWith(osName, osArch string) (bool, int) { } // GetFlavourCompatibleWith returns the downloadable resource (System) compatible with the specified OS/Arch -// Source: https://github.com/arduino/arduino-cli/blob/master/arduino/cores/tools.go#L206-L216 +// Source: https://github.com/arduino/arduino-cli/blob/master/internal/arduino/cores/tools.go#L206-L216 func (t *Tool) GetFlavourCompatibleWith(osName, osArch string) System { var correctSystem System maxSimilarity := -1 diff --git a/v2/pkgs/testdata/test_tool_index.json b/v2/pkgs/testdata/test_tool_index.json index fdee1cc9d..b7f8b87d2 100644 --- a/v2/pkgs/testdata/test_tool_index.json +++ b/v2/pkgs/testdata/test_tool_index.json @@ -514,61 +514,6 @@ "size": "6829396" } ] - }, - { - "name": "fwupdater", - "version": "0.1.12", - "systems": [ - { - "host": "i686-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_32bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_32bit.tar.bz2", - "checksum": "SHA-256:2fec2bdfd20ad4950bc9ba37108dc2a7c152f569174279c0697efe1f5a0db781", - "size": "26097546" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_64bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_64bit.tar.bz2", - "checksum": "SHA-256:ce57d0afef30cb7d3513f5da326346c99d6bf4923bbc2200634086811f3fb31e", - "size": "26073327" - }, - { - "host": "i686-mingw32", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Windows_32bit.zip", - "archiveFileName": "FirmwareUploader_0.1.12_Windows_32bit.zip", - "checksum": "SHA-256:558568b453caa1c821def8cc6d34555d0c910eb7e7e871de3ae1c39ae6f01bdd", - "size": "25743641" - }, - { - "host": "x86_64-mingw32", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Windows_64bit.zip", - "archiveFileName": "FirmwareUploader_0.1.12_Windows_64bit.zip", - "checksum": "SHA-256:ec16de33620985434280c92c3c322257b89bb67adf8fd4d5dd5f9467ea1e9e40", - "size": "25851428" - }, - { - "host": "i386-apple-darwin11", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_macOS_64bit.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_macOS_64bit.tar.bz2", - "checksum": "SHA-256:a470361b57f86ddfcaecd274d844af51ee1d23a71cd6c26e30fcef2152d1a03f", - "size": "25792860" - }, - { - "host": "arm-linux-gnueabihf", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_ARM.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_ARM.tar.bz2", - "checksum": "SHA-256:855fa0a9b942c3ee18906efc510bdfe30bf3334ff28ffbb476e648ff30033847", - "size": "25936245" - }, - { - "host": "aarch64-linux-gnu", - "url": "http://downloads.arduino.cc/tools/FirmwareUploader_0.1.12_Linux_ARM64.tar.bz2", - "archiveFileName": "FirmwareUploader_0.1.12_Linux_ARM64.tar.bz2", - "checksum": "SHA-256:691461e64fe075e9a79801347c2bd895fb72f8f2c45a7cd49056c6ad9efe8fc4", - "size": "25967430" - } - ] } ] } diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go index b0daaaaef..14f853e9e 100644 --- a/v2/pkgs/tools.go +++ b/v2/pkgs/tools.go @@ -269,15 +269,19 @@ func (t *Tools) Remove(ctx context.Context, payload *tools.ToolPayload) (*tools. return &tools.Operation{Status: "ok"}, nil } +// rename function is used to rename the path of the extracted files func rename(base string) extract.Renamer { + // "Rename" the given path adding the "base" and removing the root folder in "path" (if present). return func(path string) string { parts := strings.Split(filepath.ToSlash(path), "/") - newPath := strings.Join(parts[1:], "/") - if newPath == "" { - newPath = filepath.Join(newPath, path) + if len(parts) <= 1 { + // The path does not contain a root folder. This might happen for tool packages (zip files) + // that have an invalid structure. Do not try to remove the root folder in these cases. + return filepath.Join(base, path) } - path = filepath.Join(base, newPath) - return path + // Removes the first part of the path (the root folder). + path = strings.Join(parts[1:], "/") + return filepath.Join(base, path) } } diff --git a/v2/pkgs/tools_test.go b/v2/pkgs/tools_test.go index be4d5e4d1..edd575fc8 100644 --- a/v2/pkgs/tools_test.go +++ b/v2/pkgs/tools_test.go @@ -230,9 +230,9 @@ func TestInstall(t *testing.T) { {Name: "dfu-util", Version: "0.10.0-arduino1", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, {Name: "rp2040tools", Version: "1.0.6", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, {Name: "esptool_py", Version: "4.5.1", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, - // At the moment we don't install these ones because they are packaged in a different way: they do not have a top level dir, causing the rename funcion to behave incorrectly - // {Name: "fwupdater", Version: "0.1.12", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, - // {Name: "arduino-fwuploader", Version: "2.2.2", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, + {Name: "arduino-fwuploader", Version: "2.2.2", Packager: "arduino-test", URL: nil, Checksum: nil, Signature: nil}, + // test download of a tool not present in index. the same archive is downloaded on linux/win/mac See https://github.com/arduino/arduino-create-agent/issues/980 + {Name: "esptool", Version: "2.5.0-3-20ed2b9", Packager: "esp8266", URL: strpoint("https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.esptool-f80ae31.tar.gz"), Checksum: strpoint("SHA-256:bded1dca953377838b6086a9bcd40a1dc5286ba5f69f2372c22a1d1819baad24"), Signature: strpoint("852b58871419ce5e5633ecfaa72c0f0fa890ceb51164b362b8133bc0e3e003a21cec48935b8cdc078f4031219cbf17fb7edd9d7c9ca8ed85492911c9ca6353c9aa4691eb91fda99563a6bd49aeca0d9981fb05ec76e45c6024f8a6822862ad1e34ddc652fbbf4fa909887a255d4f087398ec386577efcec523c21203be3d10fc9e9b0f990a7536875a77dc2bc5cbffea7734b62238e31719111b718bacccebffc9be689545540e81d23b81caa66214376f58a0d6a45cf7efc5d3af62ab932b371628162fffe403906f41d5534921e5be081c5ac2ecc9db5caec03a105cc44b00ce19a95ad079843501eb8182e0717ce327867380c0e39d2b48698547fc1d0d66")}, } expectedFiles := map[string][]string{ @@ -244,8 +244,8 @@ func TestInstall(t *testing.T) { "dfu-util-0.10.0-arduino1": {"dfu-prefix", "dfu-suffix", "dfu-util"}, "rp2040tools-1.0.6": {"elf2uf2", "picotool", "pioasm", "rp2040load"}, "esptool_py-4.5.1": {"esptool"}, - // "fwupdater-0.1.12": {"firmwares", "FirmwareUploader"}, // old legacy tool - // "arduino-fwuploader-2.2.2": {"arduino-fwuploader"}, + "arduino-fwuploader-2.2.2": {"arduino-fwuploader"}, + // "esptool-2.5.0-3-20ed2b9": {"esptool"}, // we don't check if there is esptool in the archive because it's the same archive even on windows (no extension) } for _, tc := range testCases { t.Run(tc.Name+"-"+tc.Version, func(t *testing.T) { @@ -254,7 +254,7 @@ func TestInstall(t *testing.T) { require.NoError(t, err) // Check that the tool has been downloaded - toolDir := paths.New(tmp).Join("arduino-test", tc.Name, tc.Version) + toolDir := paths.New(tmp).Join(tc.Packager, tc.Name, tc.Version) require.DirExists(t, toolDir.String()) // Check that the files have been created From a679bf359c17749c056648ef1b0c66d50d418e0f Mon Sep 17 00:00:00 2001 From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:38:05 +0200 Subject: [PATCH 24/51] Improve `installed.json` handling in `v2/tools` (#983) * Introduce mutex policy to the v2 tools and use it to write the installed.json * Use a map to store installed.json information * Use the correct lock for reading and writing * Include the v2.Tools constructor in the old Tools struct * Add corrupted json test --- tools/download.go | 5 ++- tools/download_test.go | 20 +++++++++++ tools/tools.go | 3 ++ v2/pkgs/tools.go | 76 ++++++++++++++++++++---------------------- 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/tools/download.go b/tools/download.go index 6e5fa8b7f..8c4a37a6c 100644 --- a/tools/download.go +++ b/tools/download.go @@ -25,7 +25,6 @@ import ( "github.com/arduino/arduino-create-agent/gen/tools" "github.com/arduino/arduino-create-agent/utilities" - "github.com/arduino/arduino-create-agent/v2/pkgs" ) // Download will parse the index at the indexURL for the tool to download. @@ -45,8 +44,8 @@ import ( // if it already exists. func (t *Tools) Download(pack, name, version, behaviour string) error { - tool := pkgs.New(t.index, t.directory.String(), behaviour) - _, err := tool.Install(context.Background(), &tools.ToolPayload{Name: name, Version: version, Packager: pack}) + t.tools.SetBehaviour(behaviour) + _, err := t.tools.Install(context.Background(), &tools.ToolPayload{Name: name, Version: version, Packager: pack}) if err != nil { return err } diff --git a/tools/download_test.go b/tools/download_test.go index 8863a09d7..7cf2fab0d 100644 --- a/tools/download_test.go +++ b/tools/download_test.go @@ -160,3 +160,23 @@ func TestDownload(t *testing.T) { }) } } + +func TestCorruptedInstalled(t *testing.T) { + // prepare the test environment + tempDir := t.TempDir() + tempDirPath := paths.New(tempDir) + testIndex := index.Resource{ + IndexFile: *paths.New("testdata", "test_tool_index.json"), + LastRefresh: time.Now(), + } + corruptedJSON := tempDirPath.Join("installed.json") + fileJSON, err := corruptedJSON.Create() + require.NoError(t, err) + defer fileJSON.Close() + _, err = fileJSON.Write([]byte("Hello")) + require.NoError(t, err) + testTools := New(tempDirPath, &testIndex, func(msg string) { t.Log(msg) }) + // Download the tool + err = testTools.Download("arduino-test", "avrdude", "6.3.0-arduino17", "keep") + require.NoError(t, err) +} diff --git a/tools/tools.go b/tools/tools.go index cb9efc787..5cecc5089 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -22,6 +22,7 @@ import ( "sync" "github.com/arduino/arduino-create-agent/index" + "github.com/arduino/arduino-create-agent/v2/pkgs" "github.com/arduino/go-paths-helper" "github.com/xrash/smetrics" ) @@ -47,6 +48,7 @@ type Tools struct { logger func(msg string) installed map[string]string mutex sync.RWMutex + tools *pkgs.Tools } // New will return a Tool object, allowing the caller to execute operations on it. @@ -60,6 +62,7 @@ func New(directory *paths.Path, index *index.Resource, logger func(msg string)) logger: logger, installed: map[string]string{}, mutex: sync.RWMutex{}, + tools: pkgs.New(index, directory.String(), "replace"), } _ = t.readMap() return t diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go index 14f853e9e..c84d207f8 100644 --- a/v2/pkgs/tools.go +++ b/v2/pkgs/tools.go @@ -29,6 +29,7 @@ import ( "path/filepath" "runtime" "strings" + "sync" "github.com/arduino/arduino-create-agent/gen/tools" "github.com/arduino/arduino-create-agent/index" @@ -60,17 +61,23 @@ type Tools struct { index *index.Resource folder string behaviour string + installed map[string]string + mutex sync.RWMutex } // New will return a Tool object, allowing the caller to execute operations on it. // The New function will accept an index as parameter (used to download the indexes) // and a folder used to download the indexes func New(index *index.Resource, folder, behaviour string) *Tools { - return &Tools{ + t := &Tools{ index: index, folder: folder, behaviour: behaviour, + installed: map[string]string{}, + mutex: sync.RWMutex{}, } + t.readInstalled() + return t } // Installedhead is here only because it was required by the front-end. @@ -181,13 +188,10 @@ func (t *Tools) Install(ctx context.Context, payload *tools.ToolPayload) (*tools key := correctTool.Name + "-" + correctTool.Version // Check if it already exists if t.behaviour == "keep" && pathExists(t.folder) { - location, ok, err := checkInstalled(t.folder, key) - if err != nil { - return nil, err - } + location, ok := t.installed[key] if ok && pathExists(location) { // overwrite the default tool with this one - err := writeInstalled(t.folder, path) + err := t.writeInstalled(path) if err != nil { return nil, err } @@ -245,7 +249,7 @@ func (t *Tools) install(ctx context.Context, path, url, checksum string) (*tools } // Write installed.json for retrocompatibility with v1 - err = writeInstalled(t.folder, path) + err = t.writeInstalled(path) if err != nil { return nil, err } @@ -285,54 +289,41 @@ func rename(base string) extract.Renamer { } } -func readInstalled(installedFile string) (map[string]string, error) { +func (t *Tools) readInstalled() error { + t.mutex.RLock() + defer t.mutex.RUnlock() // read installed.json - installed := map[string]string{} - data, err := os.ReadFile(installedFile) - if err == nil { - err = json.Unmarshal(data, &installed) - if err != nil { - return nil, err - } - } - return installed, nil -} - -func checkInstalled(folder, key string) (string, bool, error) { - installedFile, err := utilities.SafeJoin(folder, "installed.json") - if err != nil { - return "", false, err - } - installed, err := readInstalled(installedFile) - if err != nil { - return "", false, err - } - location, ok := installed[key] - return location, ok, err -} - -func writeInstalled(folder, path string) error { - // read installed.json - installedFile, err := utilities.SafeJoin(folder, "installed.json") + installedFile, err := utilities.SafeJoin(t.folder, "installed.json") if err != nil { return err } - installed, err := readInstalled(installedFile) + data, err := os.ReadFile(installedFile) if err != nil { return err } + return json.Unmarshal(data, &t.installed) +} + +func (t *Tools) writeInstalled(path string) error { + t.mutex.Lock() + defer t.mutex.Unlock() parts := strings.Split(path, string(filepath.Separator)) tool := parts[len(parts)-2] toolWithVersion := fmt.Sprint(tool, "-", parts[len(parts)-1]) - toolFile, err := utilities.SafeJoin(folder, path) + toolFile, err := utilities.SafeJoin(t.folder, path) if err != nil { return err } - installed[tool] = toolFile - installed[toolWithVersion] = toolFile + t.installed[tool] = toolFile + t.installed[toolWithVersion] = toolFile - data, err := json.Marshal(installed) + data, err := json.Marshal(t.installed) + if err != nil { + return err + } + + installedFile, err := utilities.SafeJoin(t.folder, "installed.json") if err != nil { return err } @@ -340,6 +331,11 @@ func writeInstalled(folder, path string) error { return os.WriteFile(installedFile, data, 0644) } +// SetBehaviour sets the download behaviour to either keep or replace +func (t *Tools) SetBehaviour(behaviour string) { + t.behaviour = behaviour +} + func pathExists(path string) bool { _, err := os.Stat(path) if err == nil { From 1561223e52c891127a5f4645c0023699a804c043 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:39:07 +0200 Subject: [PATCH 25/51] Bump golang.org/x/sys from 0.20.0 to 0.23.0 (#985) * Bump golang.org/x/sys from 0.20.0 to 0.23.0 Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.20.0 to 0.23.0. - [Commits](https://github.com/golang/sys/compare/v0.20.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * update license --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Umberto Baldi --- .licensed.yml | 1 + .../go/golang.org/x/sys/unix.dep.yml | 12 ++++++------ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.licensed.yml b/.licensed.yml index f0c02a90e..104135193 100644 --- a/.licensed.yml +++ b/.licensed.yml @@ -10,6 +10,7 @@ reviewed: - golang.org/x/net/html - golang.org/x/net/html/atom - golang.org/x/crypto/curve25519 + - golang.org/x/sys/unix - github.com/ProtonMail/go-crypto/bitcurves - github.com/ProtonMail/go-crypto/brainpool - github.com/ProtonMail/go-crypto/eax diff --git a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml index 8c6dd955b..5c4780a8d 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml @@ -1,14 +1,14 @@ --- name: golang.org/x/sys/unix -version: v0.20.0 +version: v0.23.0 type: go summary: Package unix contains an interface to the low-level operating system primitives. homepage: https://pkg.go.dev/golang.org/x/sys/unix -license: bsd-3-clause +license: other licenses: -- sources: sys@v0.20.0/LICENSE +- sources: sys@v0.23.0/LICENSE text: | - Copyright (c) 2009 The Go Authors. All rights reserved. + Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -20,7 +20,7 @@ licenses: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.20.0/PATENTS +- sources: sys@v0.23.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/go.mod b/go.mod index b1f0f8fda..4b92a2573 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 go.bug.st/serial v1.6.1 goa.design/goa/v3 v3.16.1 - golang.org/x/sys v0.20.0 + golang.org/x/sys v0.23.0 gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa ) diff --git a/go.sum b/go.sum index 278446a66..2e8a44221 100644 --- a/go.sum +++ b/go.sum @@ -181,8 +181,8 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= From 3ebca0a054b2451a2a5ddc962bac3ae133f6bcfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:41:54 +0200 Subject: [PATCH 26/51] Bump github.com/ProtonMail/go-crypto from 1.1.0-alpha.2 to 1.1.0-alpha.5-proton (#974) * Bump github.com/ProtonMail/go-crypto Bumps [github.com/ProtonMail/go-crypto](https://github.com/ProtonMail/go-crypto) from 1.1.0-alpha.2 to 1.1.0-alpha.5-proton. - [Release notes](https://github.com/ProtonMail/go-crypto/releases) - [Commits](https://github.com/ProtonMail/go-crypto/compare/v1.1.0-alpha.2...v1.1.0-alpha.5-proton) --- updated-dependencies: - dependency-name: github.com/ProtonMail/go-crypto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * update licenses --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Umberto Baldi --- .licensed.yml | 3 + .../ProtonMail/go-crypto/bitcurves.dep.yml | 6 +- .../ProtonMail/go-crypto/brainpool.dep.yml | 6 +- .../ProtonMail/go-crypto/eax.dep.yml | 6 +- .../go-crypto/internal/byteutil.dep.yml | 6 +- .../ProtonMail/go-crypto/ocb.dep.yml | 6 +- .../ProtonMail/go-crypto/openpgp.dep.yml | 6 +- .../go-crypto/openpgp/aes/keywrap.dep.yml | 6 +- .../go-crypto/openpgp/armor.dep.yml | 6 +- .../ProtonMail/go-crypto/openpgp/ecdh.dep.yml | 6 +- .../go-crypto/openpgp/ecdsa.dep.yml | 6 +- .../go-crypto/openpgp/ed25519.dep.yml | 6 +- .../go-crypto/openpgp/ed448.dep.yml | 6 +- .../go-crypto/openpgp/eddsa.dep.yml | 6 +- .../go-crypto/openpgp/elgamal.dep.yml | 6 +- .../go-crypto/openpgp/errors.dep.yml | 6 +- .../openpgp/internal/algorithm.dep.yml | 6 +- .../go-crypto/openpgp/internal/ecc.dep.yml | 6 +- .../openpgp/internal/ecc/curve25519.dep.yml | 63 +++++++++++++++++++ .../internal/ecc/curve25519/field.dep.yml | 62 ++++++++++++++++++ .../openpgp/internal/encoding.dep.yml | 6 +- .../go-crypto/openpgp/packet.dep.yml | 6 +- .../ProtonMail/go-crypto/openpgp/s2k.dep.yml | 6 +- .../go-crypto/openpgp/symmetric.dep.yml | 62 ++++++++++++++++++ .../go-crypto/openpgp/x25519.dep.yml | 6 +- .../ProtonMail/go-crypto/openpgp/x448.dep.yml | 6 +- go.mod | 2 +- go.sum | 4 +- 28 files changed, 259 insertions(+), 69 deletions(-) create mode 100644 .licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.dep.yml create mode 100644 .licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field.dep.yml create mode 100644 .licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/symmetric.dep.yml diff --git a/.licensed.yml b/.licensed.yml index 104135193..12e7395a3 100644 --- a/.licensed.yml +++ b/.licensed.yml @@ -28,9 +28,12 @@ reviewed: - github.com/ProtonMail/go-crypto/openpgp/errors - github.com/ProtonMail/go-crypto/openpgp/internal/algorithm - github.com/ProtonMail/go-crypto/openpgp/internal/ecc + - github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519 + - github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field - github.com/ProtonMail/go-crypto/openpgp/internal/encoding - github.com/ProtonMail/go-crypto/openpgp/packet - github.com/ProtonMail/go-crypto/openpgp/s2k + - github.com/ProtonMail/go-crypto/openpgp/symmetric - github.com/ProtonMail/go-crypto/openpgp/x25519 - github.com/ProtonMail/go-crypto/openpgp/x448 - github.com/cloudflare/circl/dh/x25519 diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/bitcurves.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/bitcurves.dep.yml index 08606aa3f..ff1d983d0 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/bitcurves.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/bitcurves.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/bitcurves -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/bitcurves license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/brainpool.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/brainpool.dep.yml index 5cc5c2938..9ec1b1cef 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/brainpool.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/brainpool.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/brainpool -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package brainpool implements Brainpool elliptic curves. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/brainpool license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/eax.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/eax.dep.yml index 24d186b3c..e086227d1 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/eax.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/eax.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/ProtonMail/go-crypto/eax -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: 'Package eax provides an implementation of the EAX (encrypt-authenticate-translate) mode of operation, as described in Bellare, Rogaway, and Wagner "THE EAX MODE OF @@ -9,7 +9,7 @@ summary: 'Package eax provides an implementation of the EAX (encrypt-authenticat homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/eax license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -38,7 +38,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/internal/byteutil.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/internal/byteutil.dep.yml index a3835acbf..1d0b837c3 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/internal/byteutil.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/internal/byteutil.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/internal/byteutil -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/internal/byteutil license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/ocb.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/ocb.dep.yml index 4ca8e6a7f..f24f78fe7 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/ocb.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/ocb.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/ProtonMail/go-crypto/ocb -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: 'Package ocb provides an implementation of the OCB (offset codebook) mode of operation, as described in RFC-7253 of the IRTF and in Rogaway, Bellare, Black @@ -9,7 +9,7 @@ summary: 'Package ocb provides an implementation of the OCB (offset codebook) mo homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/ocb license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -38,7 +38,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp.dep.yml index b2cfe5b0e..af72530c0 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package openpgp implements high level operations on OpenPGP messages. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap.dep.yml index c8b82bc49..7cc6fb0d4 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/aes/keywrap -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package keywrap is an implementation of the RFC 3394 AES key wrapping algorithm. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/armor.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/armor.dep.yml index 5d827c6f9..982a14505 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/armor.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/armor.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/armor -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package armor implements OpenPGP ASCII Armor, see RFC 4880. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/armor license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdh.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdh.dep.yml index 19bbd5b3c..9107dd71b 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdh.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdh.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/ecdh -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package ecdh implements ECDH encryption, suitable for OpenPGP, as specified in RFC 6637, section 8. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/ecdh license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdsa.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdsa.dep.yml index 6d4935361..26ae39b99 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdsa.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ecdsa.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/ecdsa -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package ecdsa implements ECDSA signature, suitable for OpenPGP, as specified in RFC 6637, section 5. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/ecdsa license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed25519.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed25519.dep.yml index 619142d7b..b98f3d6ff 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed25519.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed25519.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/ed25519 -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package ed25519 implements the ed25519 signature algorithm for OpenPGP as defined in the Open PGP crypto refresh. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/ed25519 license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed448.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed448.dep.yml index ba001ce30..a3ec2359a 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed448.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/ed448.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/ed448 -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package ed448 implements the ed448 signature algorithm for OpenPGP as defined in the Open PGP crypto refresh. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/ed448 license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/eddsa.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/eddsa.dep.yml index a197e12e7..77cb4464e 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/eddsa.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/eddsa.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/eddsa -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package eddsa implements EdDSA signature, suitable for OpenPGP, as specified in https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7 homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/eddsa license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/elgamal.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/elgamal.dep.yml index 01278f3d4..30c4e4652 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/elgamal.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/elgamal.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/elgamal -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," @@ -8,7 +8,7 @@ summary: Package elgamal implements ElGamal encryption, suitable for OpenPGP, as homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/elgamal license: bsd-3-clause licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -37,7 +37,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/errors.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/errors.dep.yml index cb6ba9441..81688cd2f 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/errors.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/errors.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/errors -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package errors contains common error types for the OpenPGP packages. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/errors license: bsd-3-clause licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm.dep.yml index 9671f9971..6d96f4443 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/internal/algorithm -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc.dep.yml index 080c67ae9..81e8f7cb5 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/internal/ecc -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/internal/ecc license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.dep.yml new file mode 100644 index 000000000..ce6e3efe5 --- /dev/null +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.dep.yml @@ -0,0 +1,63 @@ +--- +name: github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519 +version: v1.1.0-alpha.5-proton +type: go +summary: Package curve25519 implements custom field operations without clamping for + forwarding. +homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519 +license: other +licenses: +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field.dep.yml new file mode 100644 index 000000000..8df0ed080 --- /dev/null +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field.dep.yml @@ -0,0 +1,62 @@ +--- +name: github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field +version: v1.1.0-alpha.5-proton +type: go +summary: Package field implements fast arithmetic modulo 2^255-19. +homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519/field +license: other +licenses: +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/encoding.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/encoding.dep.yml index 871478bef..990da1aa3 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/encoding.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/internal/encoding.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/internal/encoding -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package encoding implements openpgp packet field encodings as specified in RFC 4880 and 6637. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/internal/encoding license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/packet.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/packet.dep.yml index 990c817b3..c470a9e2b 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/packet.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/packet.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/packet -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880. homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/packet license: bsd-3-clause licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/s2k.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/s2k.dep.yml index 3ec86e4b8..a1a554e68 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/s2k.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/s2k.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/s2k -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1, and Argon2 specified in draft-ietf-openpgp-crypto-refresh-08 @@ -8,7 +8,7 @@ summary: Package s2k implements the various OpenPGP string-to-key transforms as homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/s2k license: bsd-3-clause licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -37,7 +37,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/symmetric.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/symmetric.dep.yml new file mode 100644 index 000000000..581db5cbd --- /dev/null +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/symmetric.dep.yml @@ -0,0 +1,62 @@ +--- +name: github.com/ProtonMail/go-crypto/openpgp/symmetric +version: v1.1.0-alpha.5-proton +type: go +summary: +homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/symmetric +license: other +licenses: +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE + text: | + Copyright (c) 2009 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS + text: | + Additional IP Rights Grant (Patents) + + "This implementation" means the copyrightable works distributed by + Google as part of the Go project. + + Google hereby grants to You a perpetual, worldwide, non-exclusive, + no-charge, royalty-free, irrevocable (except as stated in this section) + patent license to make, have made, use, offer to sell, sell, import, + transfer and otherwise run, modify and propagate the contents of this + implementation of Go, where such license applies only to those patent + claims, both currently owned or controlled by Google and acquired in + the future, licensable by Google that are necessarily infringed by this + implementation of Go. This grant does not include claims that would be + infringed only as a consequence of further modification of this + implementation. If you or your agent or exclusive licensee institute or + order or agree to the institution of patent litigation against any + entity (including a cross-claim or counterclaim in a lawsuit) alleging + that this implementation of Go or any code incorporated within this + implementation of Go constitutes direct or contributory patent + infringement, or inducement of patent infringement, then any patent + rights granted to you under this License for this implementation of Go + shall terminate as of the date such litigation is filed. +notices: [] diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x25519.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x25519.dep.yml index 79e3c7c83..16798ee8e 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x25519.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x25519.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/x25519 -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/x25519 license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x448.dep.yml b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x448.dep.yml index 21d2d9e9c..27acdb02c 100644 --- a/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x448.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ProtonMail/go-crypto/openpgp/x448.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ProtonMail/go-crypto/openpgp/x448 -version: v1.1.0-alpha.2 +version: v1.1.0-alpha.5-proton type: go summary: homepage: https://pkg.go.dev/github.com/ProtonMail/go-crypto/openpgp/x448 license: other licenses: -- sources: go-crypto@v1.1.0-alpha.2/LICENSE +- sources: go-crypto@v1.1.0-alpha.5-proton/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: go-crypto@v1.1.0-alpha.2/PATENTS +- sources: go-crypto@v1.1.0-alpha.5-proton/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/go.mod b/go.mod index 4b92a2573..356b51101 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( fyne.io/systray v1.10.0 - github.com/ProtonMail/go-crypto v1.1.0-alpha.2 + github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton github.com/arduino/go-paths-helper v1.12.0 github.com/arduino/go-serial-utils v0.1.2 github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 diff --git a/go.sum b/go.sum index 2e8a44221..1481506db 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ fyne.io/systray v1.10.0 h1:Yr1D9Lxeiw3+vSuZWPlaHC8BMjIHZXJKkek706AfYQk= fyne.io/systray v1.10.0/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE= github.com/AnatolyRugalev/goregen v0.1.0 h1:xrdXkLaskMnbxW0x4FWNj2yoednv0X2bcTBWpuJGYfE= github.com/AnatolyRugalev/goregen v0.1.0/go.mod h1:sVlY1tjcirqLBRZnCcIq1+7/Lwmqz5g7IK8AStjOVzI= -github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= -github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton h1:KVBEgU3CJpmzLChnLiSuEyCuhGhcMt3eOST+7A+ckto= +github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= github.com/arduino/go-paths-helper v1.12.0 h1:xizOQtI9iHdl19qXd1EmWg5i9W//2bOCOYwlNv8F61E= github.com/arduino/go-paths-helper v1.12.0/go.mod h1:jcpW4wr0u69GlXhTYydsdsqAjLaYK5n7oWHfKqOG6LM= From a945e56092413ccae8339879487912092552ac4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:54:02 +0200 Subject: [PATCH 27/51] Bump github.com/arduino/go-paths-helper from 1.12.0 to 1.12.1 (#962) * Bump github.com/arduino/go-paths-helper from 1.12.0 to 1.12.1 Bumps [github.com/arduino/go-paths-helper](https://github.com/arduino/go-paths-helper) from 1.12.0 to 1.12.1. - [Release notes](https://github.com/arduino/go-paths-helper/releases) - [Commits](https://github.com/arduino/go-paths-helper/compare/v1.12.0...v1.12.1) --- updated-dependencies: - dependency-name: github.com/arduino/go-paths-helper dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * update license --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Umberto Baldi --- .../go/github.com/arduino/go-paths-helper.dep.yml | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.licenses/arduino-create-agent/go/github.com/arduino/go-paths-helper.dep.yml b/.licenses/arduino-create-agent/go/github.com/arduino/go-paths-helper.dep.yml index 1de189b7f..21d102e90 100644 --- a/.licenses/arduino-create-agent/go/github.com/arduino/go-paths-helper.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/arduino/go-paths-helper.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/arduino/go-paths-helper -version: v1.12.0 +version: v1.12.1 type: go summary: homepage: https://pkg.go.dev/github.com/arduino/go-paths-helper diff --git a/go.mod b/go.mod index 356b51101..9c4e3a03d 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( fyne.io/systray v1.10.0 github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton - github.com/arduino/go-paths-helper v1.12.0 + github.com/arduino/go-paths-helper v1.12.1 github.com/arduino/go-serial-utils v0.1.2 github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 github.com/blang/semver v3.5.1+incompatible diff --git a/go.sum b/go.sum index 1481506db..1551328e1 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,8 @@ github.com/AnatolyRugalev/goregen v0.1.0/go.mod h1:sVlY1tjcirqLBRZnCcIq1+7/Lwmqz github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton h1:KVBEgU3CJpmzLChnLiSuEyCuhGhcMt3eOST+7A+ckto= github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= -github.com/arduino/go-paths-helper v1.12.0 h1:xizOQtI9iHdl19qXd1EmWg5i9W//2bOCOYwlNv8F61E= -github.com/arduino/go-paths-helper v1.12.0/go.mod h1:jcpW4wr0u69GlXhTYydsdsqAjLaYK5n7oWHfKqOG6LM= +github.com/arduino/go-paths-helper v1.12.1 h1:WkxiVUxBjKWlLMiMuYy8DcmVrkxdP7aKxQOAq7r2lVM= +github.com/arduino/go-paths-helper v1.12.1/go.mod h1:jcpW4wr0u69GlXhTYydsdsqAjLaYK5n7oWHfKqOG6LM= github.com/arduino/go-properties-orderedmap v1.8.0 h1:wEfa6hHdpezrVOh787OmClsf/Kd8qB+zE3P2Xbrn0CQ= github.com/arduino/go-properties-orderedmap v1.8.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk= github.com/arduino/go-serial-utils v0.1.2 h1:MRFwME4w/uaVkJ1R+wzz4KSbI9cF9IDVrYorazvjpTk= From fb06ef3746e769925505948b0a8c77080d6b8b92 Mon Sep 17 00:00:00 2001 From: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:48:10 +0200 Subject: [PATCH 28/51] Insert lock while reading from the installed map (#987) --- v2/pkgs/tools.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go index c84d207f8..1623d6a62 100644 --- a/v2/pkgs/tools.go +++ b/v2/pkgs/tools.go @@ -188,7 +188,7 @@ func (t *Tools) Install(ctx context.Context, payload *tools.ToolPayload) (*tools key := correctTool.Name + "-" + correctTool.Version // Check if it already exists if t.behaviour == "keep" && pathExists(t.folder) { - location, ok := t.installed[key] + location, ok := t.getInstalledValue(key) if ok && pathExists(location) { // overwrite the default tool with this one err := t.writeInstalled(path) @@ -336,6 +336,13 @@ func (t *Tools) SetBehaviour(behaviour string) { t.behaviour = behaviour } +func (t *Tools) getInstalledValue(key string) (string, bool) { + t.mutex.RLock() + defer t.mutex.RUnlock() + location, ok := t.installed[key] + return location, ok +} + func pathExists(path string) bool { _, err := os.Stat(path) if err == nil { From 6f9025e14d57c8a53faa51262bfd23339f981f0a Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 29 Aug 2024 11:25:04 +0200 Subject: [PATCH 29/51] Update `extract` to 4.0.0 and golang to 1.23 (#990) * Update extract to v4.0.0 * Update go version to 1.22 * Upgrade go to 1.23.0 --- .../workflows/check-go-dependencies-task.yml | 2 +- .github/workflows/check-go-task.yml | 2 +- .github/workflows/publish-go-tester-task.yml | 2 +- .github/workflows/release.yml | 2 +- .../workflows/test-go-integration-task.yml | 2 +- .github/workflows/test-go-task.yml | 2 +- .../extract/{v3.dep.yml => v4.dep.yml} | 6 +- .../go/github.com/ulikunitz/xz.dep.yml | 2 +- .../ulikunitz/xz/internal/hash.dep.yml | 4 +- .../ulikunitz/xz/internal/xlog.dep.yml | 4 +- .../go/github.com/ulikunitz/xz/lzma.dep.yml | 4 +- .../go/golang.org/x/crypto/sha3.dep.yml | 63 ------------------- go.mod | 6 +- go.sum | 8 +-- updater/updater_darwin.go | 2 +- v2/pkgs/tools.go | 2 +- 16 files changed, 25 insertions(+), 88 deletions(-) rename .licenses/arduino-create-agent/go/github.com/codeclysm/extract/{v3.dep.yml => v4.dep.yml} (91%) delete mode 100644 .licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index 4983e0db6..a179ee992 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -3,7 +3,7 @@ name: Check Go Dependencies env: # See: https://github.com/actions/setup-go/tree/v3#readme - GO_VERSION: "1.21" + GO_VERSION: "1.23" # See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows on: diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 7ea76eb48..6981f26cb 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -3,7 +3,7 @@ name: Check Go env: # See: https://github.com/actions/setup-go/tree/main#supported-version-syntax - GO_VERSION: "1.21" + GO_VERSION: "1.23" # See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows on: diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index aa2949e13..864f21c5f 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -31,7 +31,7 @@ on: env: PROJECT_NAME: arduino-cloud-agent - GO_VERSION: "1.21" + GO_VERSION: "1.23" jobs: run-determination: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe60ec8f8..af37a9b85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ env: AC_PASSWORD: ${{ secrets.AC_PASSWORD }} # used by gon AC_PROVIDER: ${{ secrets.AC_PROVIDER }} # used by gon # See: https://github.com/actions/setup-go/tree/v3#readme - GO_VERSION: "1.21" + GO_VERSION: "1.23" jobs: # The build job is responsible for: configuring the environment, testing and compiling process diff --git a/.github/workflows/test-go-integration-task.yml b/.github/workflows/test-go-integration-task.yml index 79766b083..7eeb8e55f 100644 --- a/.github/workflows/test-go-integration-task.yml +++ b/.github/workflows/test-go-integration-task.yml @@ -3,7 +3,7 @@ name: Test Integration env: # See: https://github.com/actions/setup-go/tree/v2#readme - GO_VERSION: "1.21" + GO_VERSION: "1.23" # See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python PYTHON_VERSION: "3.9" diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index 8a7c733ba..cbb95655f 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -3,7 +3,7 @@ name: Test Go env: # See: https://github.com/actions/setup-go/tree/v2#readme - GO_VERSION: "1.21" + GO_VERSION: "1.23" # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows on: diff --git a/.licenses/arduino-create-agent/go/github.com/codeclysm/extract/v3.dep.yml b/.licenses/arduino-create-agent/go/github.com/codeclysm/extract/v4.dep.yml similarity index 91% rename from .licenses/arduino-create-agent/go/github.com/codeclysm/extract/v3.dep.yml rename to .licenses/arduino-create-agent/go/github.com/codeclysm/extract/v4.dep.yml index 0c6f99746..9defe5f88 100644 --- a/.licenses/arduino-create-agent/go/github.com/codeclysm/extract/v3.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/codeclysm/extract/v4.dep.yml @@ -1,10 +1,10 @@ --- -name: github.com/codeclysm/extract/v3 -version: v3.1.1 +name: github.com/codeclysm/extract/v4 +version: v4.0.0 type: go summary: Package extract allows to extract archives in zip, tar.gz or tar.bz2 formats easily. -homepage: https://pkg.go.dev/github.com/codeclysm/extract/v3 +homepage: https://pkg.go.dev/github.com/codeclysm/extract/v4 license: mit licenses: - sources: LICENSE diff --git a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz.dep.yml b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz.dep.yml index 0b3c4e2b2..b02e158ff 100644 --- a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/ulikunitz/xz -version: v0.5.11 +version: v0.5.12 type: go summary: Package xz supports the compression and decompression of xz files. homepage: https://pkg.go.dev/github.com/ulikunitz/xz diff --git a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/hash.dep.yml b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/hash.dep.yml index 470737fb6..c9a34e7af 100644 --- a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/hash.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/hash.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ulikunitz/xz/internal/hash -version: v0.5.11 +version: v0.5.12 type: go summary: Package hash provides rolling hashes. homepage: https://pkg.go.dev/github.com/ulikunitz/xz/internal/hash license: bsd-3-clause licenses: -- sources: xz@v0.5.11/LICENSE +- sources: xz@v0.5.12/LICENSE text: | Copyright (c) 2014-2022 Ulrich Kunitz All rights reserved. diff --git a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/xlog.dep.yml b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/xlog.dep.yml index 5fc1e57f7..a5ec30088 100644 --- a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/xlog.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/internal/xlog.dep.yml @@ -1,13 +1,13 @@ --- name: github.com/ulikunitz/xz/internal/xlog -version: v0.5.11 +version: v0.5.12 type: go summary: Package xlog provides a simple logging package that allows to disable certain message categories. homepage: https://pkg.go.dev/github.com/ulikunitz/xz/internal/xlog license: bsd-3-clause licenses: -- sources: xz@v0.5.11/LICENSE +- sources: xz@v0.5.12/LICENSE text: | Copyright (c) 2014-2022 Ulrich Kunitz All rights reserved. diff --git a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/lzma.dep.yml b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/lzma.dep.yml index b30f1859d..66a937e5e 100644 --- a/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/lzma.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/ulikunitz/xz/lzma.dep.yml @@ -1,12 +1,12 @@ --- name: github.com/ulikunitz/xz/lzma -version: v0.5.11 +version: v0.5.12 type: go summary: Package lzma supports the decoding and encoding of LZMA streams. homepage: https://pkg.go.dev/github.com/ulikunitz/xz/lzma license: bsd-3-clause licenses: -- sources: xz@v0.5.11/LICENSE +- sources: xz@v0.5.12/LICENSE text: | Copyright (c) 2014-2022 Ulrich Kunitz All rights reserved. diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml deleted file mode 100644 index 1ef1c7c9f..000000000 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: golang.org/x/crypto/sha3 -version: v0.23.0 -type: go -summary: Package sha3 implements the SHA-3 fixed-output-length hash functions and - the SHAKE variable-output-length hash functions defined by FIPS-202. -homepage: https://pkg.go.dev/golang.org/x/crypto/sha3 -license: bsd-3-clause -licenses: -- sources: crypto@v0.23.0/LICENSE - text: | - Copyright (c) 2009 The Go Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.23.0/PATENTS - text: | - Additional IP Rights Grant (Patents) - - "This implementation" means the copyrightable works distributed by - Google as part of the Go project. - - Google hereby grants to You a perpetual, worldwide, non-exclusive, - no-charge, royalty-free, irrevocable (except as stated in this section) - patent license to make, have made, use, offer to sell, sell, import, - transfer and otherwise run, modify and propagate the contents of this - implementation of Go, where such license applies only to those patent - claims, both currently owned or controlled by Google and acquired in - the future, licensable by Google that are necessarily infringed by this - implementation of Go. This grant does not include claims that would be - infringed only as a consequence of further modification of this - implementation. If you or your agent or exclusive licensee institute or - order or agree to the institution of patent litigation against any - entity (including a cross-claim or counterclaim in a lawsuit) alleging - that this implementation of Go or any code incorporated within this - implementation of Go constitutes direct or contributory patent - infringement, or inducement of patent infringement, then any patent - rights granted to you under this License for this implementation of Go - shall terminate as of the date such litigation is filed. -notices: [] diff --git a/go.mod b/go.mod index 9c4e3a03d..82ee10173 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/arduino/arduino-create-agent -go 1.21 +go 1.23.0 require ( fyne.io/systray v1.10.0 @@ -9,7 +9,7 @@ require ( github.com/arduino/go-serial-utils v0.1.2 github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 github.com/blang/semver v3.5.1+incompatible - github.com/codeclysm/extract/v3 v3.1.1 + github.com/codeclysm/extract/v4 v4.0.0 github.com/gin-contrib/cors v1.7.2 github.com/gin-gonic/gin v1.10.0 github.com/go-ini/ini v1.62.0 @@ -71,7 +71,7 @@ require ( github.com/tevino/abool v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go v1.1.6 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect + github.com/ulikunitz/xz v0.5.12 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.17.0 // indirect diff --git a/go.sum b/go.sum index 1551328e1..bee2988ac 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/ github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/codeclysm/extract/v3 v3.1.1 h1:iHZtdEAwSTqPrd+1n4jfhr1qBhUWtHlMTjT90+fJVXg= -github.com/codeclysm/extract/v3 v3.1.1/go.mod h1:ZJi80UG2JtfHqJI+lgJSCACttZi++dHxfWuPaMhlOfQ= +github.com/codeclysm/extract/v4 v4.0.0 h1:H87LFsUNaJTu2e/8p/oiuiUsOK/TaPQ5wxsjPnwPEIY= +github.com/codeclysm/extract/v4 v4.0.0/go.mod h1:SFju1lj6as7FvUgalpSct7torJE0zttbJUWtryPRG6s= github.com/creack/goselect v0.1.2 h1:2DNy14+JPjRBgPzAd1thbQp4BSIihxcBf0IXhQXDRa0= github.com/creack/goselect v0.1.2/go.mod h1:a/NhLweNvqIYMuxcMOuWY516Cimucms3DglDzQP3hKY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -155,8 +155,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.6 h1:zoJUBK8kLIUDNJ9LGB04qOQRfoDRoWBBpl0X7pZyi5I= github.com/ugorji/go v1.1.6/go.mod h1:RaaajvHwnCbhlqWLTIB78hyPWp24YUXhQ3YXM7Hg7os= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= +github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6GjdjIyeqR7+EVhAF9CBQmkmW7Zw0w= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= go.bug.st/serial v1.6.1 h1:VSSWmUxlj1T/YlRo2J104Zv3wJFrjHIl/T3NeruWAHY= diff --git a/updater/updater_darwin.go b/updater/updater_darwin.go index c4eb5070d..829466352 100644 --- a/updater/updater_darwin.go +++ b/updater/updater_darwin.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/arduino/go-paths-helper" - "github.com/codeclysm/extract/v3" + "github.com/codeclysm/extract/v4" "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus" ) diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go index 1623d6a62..f09dc3f0a 100644 --- a/v2/pkgs/tools.go +++ b/v2/pkgs/tools.go @@ -35,7 +35,7 @@ import ( "github.com/arduino/arduino-create-agent/index" "github.com/arduino/arduino-create-agent/utilities" "github.com/blang/semver" - "github.com/codeclysm/extract/v3" + "github.com/codeclysm/extract/v4" ) // public vars to allow override in the tests From 63ef1111488408f5549f6918a5ee62c2814bb6d7 Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 3 Sep 2024 12:21:07 -0700 Subject: [PATCH 30/51] [skip-changelog] Configure actions/upload-artifact action to upload required hidden files A breaking change was made in the 3.2.1 release of the "actions/upload-artifact" action, without doing a major version bump as would be done in a responsibly maintained project. The action now defaults to not uploading "hidden" files. This project's "Check Go Dependencies" workflow uses the "Licensed" tool to check for incompatible dependency licenses. The dependencies license metadata cache used by Licensed is stored in a folder named `.licensed`. In order to facilitate updates, the workflow uploads the generated dependencies license metadata cache as a workflow artifact when the current cache is found to be outdated. The `.` at the start of the `.licensed` folder name causes it to now not be uploaded to the workflow artifact. In order to catch such problems, the workflow configures the "actions/upload-artifact" action to fail if no files were uploaded. So in addition to not uploading the artifact, the change in the "actions/upload-artifact" action's behavior also resulted in the workflow runs failing: Error: No files were found with the provided path: .licenses/. No artifacts will be uploaded. The problem is fixed by disabling the "actions/upload-artifact" action's new behavior via the `include-hidden-files` input. After this change, the workflow can once more upload the dependencies license metadata cache to a workflow artifact as needed. --- .github/workflows/check-go-dependencies-task.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index a179ee992..5b78888bb 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -108,6 +108,7 @@ jobs: uses: actions/upload-artifact@v4 with: if-no-files-found: error + include-hidden-files: true name: dep-licenses-cache path: ${{ env.CACHE_PATH }} From d36d0e142b8b46c0cde117f94b37b37422b806d7 Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Thu, 24 Oct 2024 14:11:20 +0200 Subject: [PATCH 31/51] upload: don't ignore BindJSON errors (#999) * upload: don't ignore BindJSON errors --- conn.go | 6 ++++-- main_test.go | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index 727a5cadb..b6e03268c 100644 --- a/conn.go +++ b/conn.go @@ -80,9 +80,11 @@ type Upload struct { var uploadStatusStr = "ProgrammerStatus" func uploadHandler(c *gin.Context) { - data := new(Upload) - c.BindJSON(data) + if err := c.BindJSON(data); err != nil { + c.String(http.StatusBadRequest, fmt.Sprintf("err with the payload. %v", err.Error())) + return + } log.Printf("%+v %+v %+v %+v %+v %+v", data.Port, data.Board, data.Rewrite, data.Commandline, data.Extra, data.Filename) diff --git a/main_test.go b/main_test.go index 568556953..d6f23fcec 100644 --- a/main_test.go +++ b/main_test.go @@ -18,6 +18,7 @@ package main import ( "bytes" "crypto/x509" + "encoding/base64" "encoding/json" "encoding/pem" "fmt" @@ -87,6 +88,30 @@ func TestUploadHandlerAgainstEvilFileNames(t *testing.T) { } } +func TestUploadHandlerAgainstBase64WithoutPaddingMustFail(t *testing.T) { + r := gin.New() + r.POST("/", uploadHandler) + ts := httptest.NewServer(r) + defer ts.Close() + + // When calling the `BindJSON` func, when a json field will be Unmarshaled + // in a []byte type, we expect to receive a base64 padded string in input. + // In case we receive a base64 unpadded string BindJSON fails. + // The expectation here is that the upload handler won't continue with the + // upload operation. + base64ContentWithoutPadding := base64.RawStdEncoding.EncodeToString([]byte("test")) + payload := fmt.Sprintf(`{"hex": "%s"}`, base64ContentWithoutPadding) + + resp, err := http.Post(ts.URL, "encoding/json", bytes.NewBufferString(payload)) + require.NoError(t, err) + require.Equal(t, http.StatusBadRequest, resp.StatusCode) + + defer resp.Body.Close() + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + require.Contains(t, string(body), "err with the payload. illegal base64 data at input") +} + func TestInstallToolV2(t *testing.T) { indexURL := "https://downloads.arduino.cc/packages/package_index.json" From 84a3854a3fe479a9da1151a61b234199113d82e0 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 10 Jan 2025 11:13:00 +0100 Subject: [PATCH 32/51] docs: update references from Arduino Create Web Editor to Arduino Cloud (#1001) * docs: update references from Arduino Create Web Editor to Arduino Cloud in README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fc88205a2..db5e92c65 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![Check Go Dependencies status](https://github.com/arduino/arduino-create-agent/actions/workflows/check-go-dependencies-task.yml/badge.svg)](https://github.com/arduino/arduino-create-agent/actions/workflows/check-go-dependencies-task.yml) [![Check Go status](https://github.com/arduino/arduino-create-agent/actions/workflows/check-go-task.yml/badge.svg)](https://github.com/arduino/arduino-create-agent/actions/workflows/check-go-task.yml) -The Arduino Cloud Agent is a single binary that will sit on the traybar and work in the background. It allows you to use the [Arduino Create applications](https://create.arduino.cc) to seamlessly upload code to any USB connected Arduino board (or YĂşn in LAN) directly from the browser. +The Arduino Cloud Agent is a single binary that will sit on the traybar and work in the background. It allows you to use the [Arduino Cloud](https://app.arduino.cc/) to seamlessly upload code to any USB connected Arduino board (or YĂşn in LAN) directly from the browser. ## Architecture @@ -18,8 +18,8 @@ The Arduino Cloud Agent is a single binary that will sit on the traybar and work | Browser | | | Web socket +----------------------+ flashes +---------------+ | +---------------------------+ |<-------------->| +------------>| | -| | | | | Arduino Cloud Agent | | Arduino Board | -| | Arduino Create Web Editor | +--------------->| |<------------+ | +| | | | | Arduino Cloud Agent | | Arduino Board | +| | Arduino Cloud | +--------------->| |<------------+ | | | | | REST API +----------------------+ serial +---------------+ | +---------------------------+ | +-------------------------------+ @@ -27,11 +27,11 @@ The Arduino Cloud Agent is a single binary that will sit on the traybar and work ## Installation -Get the [latest version](https://github.com/arduino/arduino-create-agent/releases) of the Agent for all supported platforms or complete the [Getting Started](https://create.arduino.cc/getting-started/plugin/welcome). +Get the [latest version](https://github.com/arduino/arduino-create-agent/releases) of the Agent for all supported platforms or complete the [Getting Started](https://cloud.arduino.cc/download-agent/). ## Apple silicon support -The Arduino Agent is supported both on Intel and Apple silicon computers. This includes devices with the M1, M2 and M3 processors. +The Arduino Agent is supported both on Intel and Apple silicon computers. This includes devices with the M1, M2 and M3 processors. The Arduino Agent is built both for Intel architectures and Apple silicon devices, but distributed as a single universal executable for macOS. ## Documentation From 2cb53d3defa3fa19f50d6bccafe55935598ffd3b Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 10 Jan 2025 14:50:30 +0100 Subject: [PATCH 33/51] fix: update libwebkit2gtk package version in workflow (#1004) --- .github/workflows/check-go-task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 6981f26cb..21478d23e 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -82,7 +82,7 @@ jobs: version: 3.x - name: Install Dependencies - run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev + run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.1-0 libappindicator3-dev - name: Check for errors env: From 67db428c24bbcb33e70c0bebbb97c57addd53131 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 10 Jan 2025 15:38:01 +0100 Subject: [PATCH 34/51] ci(Taskfile): add install and run tasks for local development with auto-reload (#1003) --- Taskfile.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index b64b12bb5..bba07548e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,6 +1,17 @@ version: "3" tasks: + + install: + desc: Install dependencies for local development + cmds: + - go install github.com/githubnemo/CompileDaemon@v1.4.0 + + run: + desc: Run the project locally with auto-reload and data race detector + cmds: + - CompileDaemon -build="go build -race" -command="./arduino-create-agent" -graceful-kill=true + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml general:cache-dep-licenses: desc: Cache dependency license metadata From 1eb1d343d708ea334eadbac4519754c6ef3cda9f Mon Sep 17 00:00:00 2001 From: Davide Date: Thu, 16 Jan 2025 17:44:05 +0100 Subject: [PATCH 35/51] fix: name of arch macos build (#1008) --- .github/workflows/publish-go-tester-task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 864f21c5f..1c1a73bab 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -130,7 +130,7 @@ jobs: mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME}}_amd64 if: runner.os == 'macOS' - - name: Build the Agent for macos amd 64 + - name: Build the Agent for macos arm 64 env: MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac CGO_CFLAGS: -mmacosx-version-min=10.15 From f1ca3c9305d8875bf337dcabd62194f365d603e7 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 17 Jan 2025 12:23:29 +0100 Subject: [PATCH 36/51] ci: update macOS version in publish workflow to macos-13 (#1007) * ci: update macOS version in workflows from macos-13 --- .github/workflows/publish-go-tester-task.yml | 2 +- .github/workflows/release.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 1c1a73bab..8e72c351a 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -65,7 +65,7 @@ jobs: #use the strategy instead because we still use the native build strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-12] + os: [ubuntu-20.04, windows-2019, macos-13] arch: [-amd64] include: - os: windows-2019 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af37a9b85..3b2a210d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: prerelease: ${{ steps.prerelease.outputs.IS_PRE }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-12] + os: [ubuntu-20.04, windows-2019, macos-13] arch: [amd64] include: - os: windows-2019 @@ -116,7 +116,7 @@ jobs: run: | task go:build mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 - if: matrix.os == 'macos-12' + if: matrix.os == 'macos-13' - name: Build the Agent for macos arm64 env: @@ -128,13 +128,13 @@ jobs: run: | task go:build mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_arm64 - if: matrix.os == 'macos-12' + if: matrix.os == 'macos-13' - name: Create universal macos executable run: | lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64 rm ${{ env.PROJECT_NAME }}_amd64 ${{ env.PROJECT_NAME }}_arm64 - if: matrix.os == 'macos-12' + if: matrix.os == 'macos-13' # this will create `public/` dir with compressed full bin (/-.gz) and a json file - name: Create autoupdate files @@ -146,7 +146,7 @@ jobs: run: | cp darwin-amd64.json darwin-arm64.json cp ${TAG_VERSION}/darwin-amd64.gz ${TAG_VERSION}/darwin-arm64.gz - if: matrix.os == 'macos-12' && steps.prerelease.outputs.IS_PRE != 'true' + if: matrix.os == 'macos-13' && steps.prerelease.outputs.IS_PRE != 'true' - name: Create autoupdate files for win32 run: go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION} @@ -181,7 +181,7 @@ jobs: matrix: arch: [amd64, arm64] - runs-on: macos-12 + runs-on: macos-13 env: EXE_PATH: "skel/ArduinoCloudAgent.app/Contents/MacOS/" @@ -195,7 +195,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-macos-12-amd64 # if we want to support darwin-arm64 in the future for real this has to change. + name: ${{ env.PROJECT_NAME }}-macos-13-amd64 # if we want to support darwin-arm64 in the future for real this has to change. path: ${{ env.EXE_PATH }} - name: Remove placeholder file @@ -252,7 +252,7 @@ jobs: matrix: arch: [amd64, arm64] - runs-on: macos-12 + runs-on: macos-13 env: GON_PATH: ${{ github.workspace }}/gon needs: [build, create-macos-bundle] @@ -509,7 +509,7 @@ jobs: matrix: arch: [amd64] - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout repo with icons/background uses: actions/checkout@v4 From 1b94cccb9865c34bb10a80e505eab8700e06cda0 Mon Sep 17 00:00:00 2001 From: Davide Date: Tue, 21 Jan 2025 09:28:50 +0100 Subject: [PATCH 37/51] fix(serialport): data race on the `isClosing` bool status of the serial port (#1009) * fix: use atomic boolean for thread-safe isClosing flag --- serialport.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/serialport.go b/serialport.go index a11483f63..0d386bbfc 100755 --- a/serialport.go +++ b/serialport.go @@ -20,6 +20,7 @@ import ( "encoding/base64" "io" "strconv" + "sync/atomic" "time" "unicode/utf8" @@ -43,7 +44,7 @@ type serport struct { // Keep track of whether we're being actively closed // just so we don't show scary error messages - isClosing bool + isClosing atomic.Bool isClosingDueToError bool @@ -85,7 +86,7 @@ func (p *serport) reader(buftype string) { bufferPart := serialBuffer[:n] //if we detect that port is closing, break out of this for{} loop. - if p.isClosing { + if p.isClosing.Load() { strmsg := "Shutting down reader on " + p.portConf.Name log.Println(strmsg) h.broadcastSys <- []byte(strmsg) @@ -348,7 +349,8 @@ func spHandlerOpen(portname string, baud int, buftype string) { } func (p *serport) Close() { - p.isClosing = true + p.isClosing.Store(true) + p.bufferwatcher.Close() p.portIo.Close() serialPorts.MarkPortAsClosed(p.portName) From f0857f0c65a5178b5798d92365310f01c78da766 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 1 Mar 2025 20:35:55 -0800 Subject: [PATCH 38/51] Use canonical github/setup-licensed action in dependencies license check workflow This GitHub Actions action is used by the dependencies license check workflow to install the "Licensed" tool in the runner workspace. At the time the workflow was developed, the action was owned by GitHub user `jonabc`, and so the action was referenced as `jonabc/setup-licensed` in the workflow. Since that time, the action was transferred to the `github` GitHub organization. Making things more confusing is the fact that GitHub user `jonabc` now has a development fork of the `github/setup-licensed` repository, meaning that the redirect GitHub provides from the old to the new repository after a transfer does not exist for this action. This resulted in the workflow referencing an outdated copy of the action not intended for production use. The workflow is hereby updated to use the canonical "github/setup-licensed" action. --- .github/workflows/check-go-dependencies-task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index 5b78888bb..183899c2d 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -124,7 +124,7 @@ jobs: submodules: recursive - name: Install licensed - uses: jonabc/setup-licensed@v1 + uses: github/setup-licensed@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} version: 3.x From 2bf6e95284d1ff223feff780d4858310d3b128d6 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 1 Mar 2025 20:39:20 -0800 Subject: [PATCH 39/51] Use latest version of "github/setup-licensed" action The "github/setup-licensed" action is used by the dependencies license check workflow to install the "Licensed" tool in the runner machine. Previously the `v1` major version ref of the action was specified in the workflow. This approach is used in order to allow the workflow to automatically always use the latest minor version of the action, only requiring the project maintainers to perform a bump of the action after each major version release. In a competently maintained action project, the major version ref will be updated after each release within that major version series so that it always points to the latest release version. Unfortunately that was not done by the "github/setup-licensed" action maintainers. This means that the use of the `v1` ref in the workflow causes an outdated version of the action to be used. This has been reported to the action maintainers, but unfortunately instead of fixing the problem they archived the repository, so there is no hope of it being resolved. The solution is to replace the major version ref with the ref for the latest release tag. This won't result in an increased maintenance burden because the action repository is archived and thus there won't be any bumps. --- .github/workflows/check-go-dependencies-task.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index 183899c2d..a72d247ac 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -124,7 +124,7 @@ jobs: submodules: recursive - name: Install licensed - uses: github/setup-licensed@v1 + uses: github/setup-licensed@v1.3.1 with: github_token: ${{ secrets.GITHUB_TOKEN }} version: 3.x From 26bd5667ba31bb2b5e7e19bfa4a33ad6bbf0802f Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Mar 2025 02:11:53 -0800 Subject: [PATCH 40/51] Use maintained fork of "setup-licensed" action in dependencies license check workflow This GitHub Actions action is used by the dependencies license check workflow to install the "Licensed" tool in the runner workspace. The action has a convoluted history: the repository was originally owned by GitHub user `jonabc`. It was later transferred to the `github` organization. Then GitHub abandoned the project, archiving the repository. The `licensee` organization has now created a hard fork of the action, which is recommended in the readme of the `github/setup-licensed` repository. The `licensee` organization has also taken over the management of the "Licensed" tool, and their `licensee` Ruby gem is a significant dependency of "Licensed". So they will be best equipped to maintain the action going forward. The workflow is hereby updated to use the canonical "licensee/setup-licensed" action. The "licensee/setup-licensed" action maintainers have not provided a major version ref, so it is necessary to pin the action to the latest release tag. --- .github/workflows/check-go-dependencies-task.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index a72d247ac..aa7b26e3f 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -73,7 +73,7 @@ jobs: submodules: recursive - name: Install licensed - uses: jonabc/setup-licensed@v1 + uses: licensee/setup-licensed@v1.3.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} version: 3.x @@ -124,7 +124,7 @@ jobs: submodules: recursive - name: Install licensed - uses: github/setup-licensed@v1.3.1 + uses: licensee/setup-licensed@v1.3.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} version: 3.x From 1f89384366920359c063e18ef704f6d39413b6a8 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Mar 2025 02:43:13 -0800 Subject: [PATCH 41/51] Configure dependency license check workflows to allow "Licensed" install via Gem The "Licensed" tool is used to check the project's compatibility with the licensing of its dependencies. This tool is installed by the dependency license check GitHub Actions workflow using the `licensee/setup-licensed` GitHub Actions action. This action attempts the installation according to the following procedure: 1. Install the Ruby gem. 2. If gem installation fails, install the pre-built executable from the GitHub release asset in the `licensee/licensed` repo. Previously, the first of these installation methods was failing: ```text /usr/bin/gem install licensed -v 3.9.1 ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/3.2.0 directory. /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:713:in `verify_gem_home' /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:903:in `pre_install_checks' /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:303:in `install' /usr/lib/ruby/vendor_ruby/rubygems/resolver/specification.rb:105:in `install' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:195:in `block in install' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:183:in `each' /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:183:in `install' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:215:in `install_gem' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:231:in `block in install_gems' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:224:in `each' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:224:in `install_gems' /usr/lib/ruby/vendor_ruby/rubygems/commands/install_command.rb:170:in `execute' /usr/lib/ruby/vendor_ruby/rubygems/command.rb:328:in `invoke_with_build_args' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:253:in `invoke_command' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:193:in `process_args' /usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:151:in `run' /usr/lib/ruby/vendor_ruby/rubygems/gem_runner.rb:52:in `run' /usr/bin/gem:12:in `
' gem installation was not successful ``` So it falls back on the second installation method. That method works fine when using a version of "Licensed" <4.0.0. However, starting from version 4.0.0, pre-built executable are no longer provided, so the only available installation method for modern versions of "Licensed" is via the Ruby gem. The gem failure can be avoided by setting up an accessible installation of Ruby in the runner machine, which is accomplished using the "ruby/setup-ruby" action in a step preceding the `licensee/setup-licensed` step in the workflow. --- .github/workflows/check-go-dependencies-task.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index aa7b26e3f..67a2944e3 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -72,6 +72,12 @@ jobs: with: submodules: recursive + # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby # Install latest version + - name: Install licensed uses: licensee/setup-licensed@v1.3.2 with: @@ -123,6 +129,12 @@ jobs: with: submodules: recursive + # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby # Install latest version + - name: Install licensed uses: licensee/setup-licensed@v1.3.2 with: From b2e28c0345cf4043daa2f011884ecbb1b144b292 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Mar 2025 02:37:28 -0800 Subject: [PATCH 42/51] Bump "Licensed" version in dependencies license check workflow The version of the "Licensed" tool for use in the GitHub Actions workflow is defined via the "licensee/setup-licensed" action's `version` input. Previously the action was configured to install version 3.x of the action. That version is significantly outdated. The workflow is hereby updated to use the latest version of Licensed. --- .github/workflows/check-go-dependencies-task.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index 67a2944e3..417c525e5 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -82,7 +82,7 @@ jobs: uses: licensee/setup-licensed@v1.3.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x + version: 5.x - name: Install Go uses: actions/setup-go@v5 @@ -139,7 +139,7 @@ jobs: uses: licensee/setup-licensed@v1.3.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x + version: 5.x - name: Install Go uses: actions/setup-go@v5 From 0fae57e21178bfb6c6f60ea626f08349d453c2ea Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Mar 2025 03:39:06 -0800 Subject: [PATCH 43/51] Remove trailing space from dependency license metadata The dependency license metadata is generated by the "Licensed" tool. Previous versions of this tool added a trailing space on the `summary` key. Although trailing whitespace in human produced content is not permitted, machine generated content is used as-is, and so these trailing spaces were left in the metadata files. It seems that the defect in the "Licensed" tool that caused the trailing space was fixed in a recent version because it is now absent in the metadata files produced by the tool. The metadata files are hereby updated to use the format of the version of the "Licensed" tool currently in use. --- .../go/github.com/arduino/go-serial-utils.dep.yml | 2 +- .../arduino-create-agent/go/github.com/blang/semver.dep.yml | 2 +- .../arduino-create-agent/go/github.com/creack/goselect.dep.yml | 2 +- .../arduino-create-agent/go/github.com/gin-contrib/sse.dep.yml | 2 +- .../go/github.com/gin-gonic/gin/binding.dep.yml | 2 +- .../go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml | 2 +- .../go/github.com/gin-gonic/gin/internal/json.dep.yml | 2 +- .../go/github.com/gin-gonic/gin/render.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io/message.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io/parser.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io/polling.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io/transport.dep.yml | 2 +- .../go/github.com/googollee/go-engine.io/websocket.dep.yml | 2 +- .../arduino-create-agent/go/github.com/h2non/filetype.dep.yml | 2 +- .../go/github.com/h2non/filetype/matchers.dep.yml | 2 +- .../go/github.com/h2non/filetype/matchers/isobmff.dep.yml | 2 +- .../go/github.com/h2non/filetype/types.dep.yml | 2 +- .../go/github.com/mattn/go-shellwords.dep.yml | 2 +- .../github.com/pelletier/go-toml/v2/internal/characters.dep.yml | 2 +- .../go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml | 2 +- .../go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml | 2 +- .../arduino-create-agent/go/github.com/xrash/smetrics.dep.yml | 2 +- .../arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml | 2 +- .../go/golang.org/x/text/internal/language.dep.yml | 2 +- .../go/gopkg.in/inconshreveable/go-update.v0/download.dep.yml | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.licenses/arduino-create-agent/go/github.com/arduino/go-serial-utils.dep.yml b/.licenses/arduino-create-agent/go/github.com/arduino/go-serial-utils.dep.yml index d80310c77..fb7fa6ea5 100644 --- a/.licenses/arduino-create-agent/go/github.com/arduino/go-serial-utils.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/arduino/go-serial-utils.dep.yml @@ -2,7 +2,7 @@ name: github.com/arduino/go-serial-utils version: v0.1.2 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/arduino/go-serial-utils license: gpl-3.0 licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml b/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml index 3ef4e43fa..d1655fecd 100644 --- a/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml @@ -2,7 +2,7 @@ name: github.com/blang/semver version: v3.5.1+incompatible type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/blang/semver license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml b/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml index 2ebe18293..65e69c4c1 100644 --- a/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml @@ -2,7 +2,7 @@ name: github.com/creack/goselect version: v0.1.2 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/creack/goselect license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/gin-contrib/sse.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-contrib/sse.dep.yml index 4895be7a5..c888d59ab 100644 --- a/.licenses/arduino-create-agent/go/github.com/gin-contrib/sse.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gin-contrib/sse.dep.yml @@ -2,7 +2,7 @@ name: github.com/gin-contrib/sse version: v0.1.0 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/gin-contrib/sse license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml index 6801615fa..a99238ac3 100644 --- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/binding.dep.yml @@ -2,7 +2,7 @@ name: github.com/gin-gonic/gin/binding version: v1.10.0 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/gin-gonic/gin/binding license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml index c9d7afd9a..97e8d6cb9 100644 --- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/bytesconv.dep.yml @@ -2,7 +2,7 @@ name: github.com/gin-gonic/gin/internal/bytesconv version: v1.10.0 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/gin-gonic/gin/internal/bytesconv license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml index 57739599b..2551fb8d9 100644 --- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/internal/json.dep.yml @@ -2,7 +2,7 @@ name: github.com/gin-gonic/gin/internal/json version: v1.10.0 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/gin-gonic/gin/internal/json license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml index 5b0dc5bbb..deb06fb36 100644 --- a/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gin-gonic/gin/render.dep.yml @@ -2,7 +2,7 @@ name: github.com/gin-gonic/gin/render version: v1.10.0 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/gin-gonic/gin/render license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io.dep.yml index a798ca46f..3d65daba3 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/message.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/message.dep.yml index ccf2355f5..55490cf08 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/message.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/message.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io/message version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io/message license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/parser.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/parser.dep.yml index 0a08396a0..718fadade 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/parser.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/parser.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io/parser version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io/parser license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/polling.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/polling.dep.yml index ccc32fe6e..5692db014 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/polling.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/polling.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io/polling version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io/polling license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/transport.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/transport.dep.yml index d48516a8a..430ab5ad5 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/transport.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/transport.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io/transport version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io/transport license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/websocket.dep.yml b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/websocket.dep.yml index 9eb8de2c2..3718a69b2 100644 --- a/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/websocket.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/googollee/go-engine.io/websocket.dep.yml @@ -2,7 +2,7 @@ name: github.com/googollee/go-engine.io/websocket version: v0.0.0-20180829091931-e2f255711dcb type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/googollee/go-engine.io/websocket license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/h2non/filetype.dep.yml b/.licenses/arduino-create-agent/go/github.com/h2non/filetype.dep.yml index 02102b9ee..ce88ad732 100644 --- a/.licenses/arduino-create-agent/go/github.com/h2non/filetype.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/h2non/filetype.dep.yml @@ -2,7 +2,7 @@ name: github.com/h2non/filetype version: v1.1.3 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/h2non/filetype license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers.dep.yml b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers.dep.yml index e9421e1f8..e441102a1 100644 --- a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers.dep.yml @@ -2,7 +2,7 @@ name: github.com/h2non/filetype/matchers version: v1.1.3 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/h2non/filetype/matchers license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers/isobmff.dep.yml b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers/isobmff.dep.yml index 0a3984965..d18a56f5a 100644 --- a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers/isobmff.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/matchers/isobmff.dep.yml @@ -2,7 +2,7 @@ name: github.com/h2non/filetype/matchers/isobmff version: v1.1.3 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/h2non/filetype/matchers/isobmff license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/types.dep.yml b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/types.dep.yml index f8fe41654..6a3e9ff8c 100644 --- a/.licenses/arduino-create-agent/go/github.com/h2non/filetype/types.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/h2non/filetype/types.dep.yml @@ -2,7 +2,7 @@ name: github.com/h2non/filetype/types version: v1.1.3 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/h2non/filetype/types license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/mattn/go-shellwords.dep.yml b/.licenses/arduino-create-agent/go/github.com/mattn/go-shellwords.dep.yml index afff99822..742e6604f 100644 --- a/.licenses/arduino-create-agent/go/github.com/mattn/go-shellwords.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/mattn/go-shellwords.dep.yml @@ -2,7 +2,7 @@ name: github.com/mattn/go-shellwords version: v1.0.12 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/mattn/go-shellwords license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml index afddf80f5..59a3269ba 100644 --- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/characters.dep.yml @@ -2,7 +2,7 @@ name: github.com/pelletier/go-toml/v2/internal/characters version: v2.2.2 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/characters license: other licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml index 5fe64d014..36075df83 100644 --- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/danger.dep.yml @@ -2,7 +2,7 @@ name: github.com/pelletier/go-toml/v2/internal/danger version: v2.2.2 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/danger license: other licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml index 6b73e51e6..954011183 100644 --- a/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/pelletier/go-toml/v2/internal/tracker.dep.yml @@ -2,7 +2,7 @@ name: github.com/pelletier/go-toml/v2/internal/tracker version: v2.2.2 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/pelletier/go-toml/v2/internal/tracker license: other licenses: diff --git a/.licenses/arduino-create-agent/go/github.com/xrash/smetrics.dep.yml b/.licenses/arduino-create-agent/go/github.com/xrash/smetrics.dep.yml index f2795524e..cbd322a2e 100644 --- a/.licenses/arduino-create-agent/go/github.com/xrash/smetrics.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/xrash/smetrics.dep.yml @@ -2,7 +2,7 @@ name: github.com/xrash/smetrics version: v0.0.0-20170218160415-a3153f7040e9 type: go -summary: +summary: homepage: https://pkg.go.dev/github.com/xrash/smetrics license: mit licenses: diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml index b744d2524..d81d7857c 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml @@ -2,7 +2,7 @@ name: go.bug.st/serial/unixutils version: v1.6.1 type: go -summary: +summary: homepage: https://pkg.go.dev/go.bug.st/serial/unixutils license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml index 988bad3c9..4a392d8cf 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml @@ -2,7 +2,7 @@ name: golang.org/x/text/internal/language version: v0.15.0 type: go -summary: +summary: homepage: https://pkg.go.dev/golang.org/x/text/internal/language license: bsd-3-clause licenses: diff --git a/.licenses/arduino-create-agent/go/gopkg.in/inconshreveable/go-update.v0/download.dep.yml b/.licenses/arduino-create-agent/go/gopkg.in/inconshreveable/go-update.v0/download.dep.yml index 5894a7618..12e0b1dcf 100644 --- a/.licenses/arduino-create-agent/go/gopkg.in/inconshreveable/go-update.v0/download.dep.yml +++ b/.licenses/arduino-create-agent/go/gopkg.in/inconshreveable/go-update.v0/download.dep.yml @@ -2,7 +2,7 @@ name: gopkg.in/inconshreveable/go-update.v0/download version: v0.0.0-20150814200126-d8b0b1d421aa type: go -summary: +summary: homepage: https://pkg.go.dev/gopkg.in/inconshreveable/go-update.v0/download license: apache-2.0 licenses: From bfab101eddb16374c6f97e29a0a240e15e5a5af7 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Mar 2025 03:42:05 -0800 Subject: [PATCH 44/51] Add generated YAML document end markers to dependency license metadata cache The dependency license metadata is generated by the "Licensed" tool. The version of the tool now in use adds YAML document end markers to some metadata files, which were not present in the files generated by the tool at the time the cache was established. I don't know why it adds these markers to only some of the metadata files, but they are valid (though optional so the files without are also correct) and machine generated content is used as-is. The metadata files are hereby updated to use the format produced by the version of the "Licensed" tool currently in use. --- .../arduino-create-agent/go/github.com/blang/semver.dep.yml | 1 + .../arduino-create-agent/go/github.com/creack/goselect.dep.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml b/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml index d1655fecd..39cce428f 100644 --- a/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/blang/semver.dep.yml @@ -33,3 +33,4 @@ licenses: - sources: README.md text: See [LICENSE](LICENSE) file. notices: [] +... diff --git a/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml b/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml index 65e69c4c1..0785cd02c 100644 --- a/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/creack/goselect.dep.yml @@ -33,3 +33,4 @@ licenses: - sources: README.md text: Released under the [MIT license](LICENSE). notices: [] +... From 5fcb7c47f666bdb2f85188e7968ccde698b44c40 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 19 Mar 2025 10:08:36 +0100 Subject: [PATCH 45/51] Updated go-serial and pluggable-discovery-protocol-handler (#1023) --- .../pluggable-discovery-protocol-handler/v2.dep.yml | 2 +- .../arduino-create-agent/go/go.bug.st/serial.dep.yml | 6 +++--- .../go/go.bug.st/serial/enumerator.dep.yml | 10 +++++----- .../go/go.bug.st/serial/unixutils.dep.yml | 12 ++++++------ go.mod | 4 ++-- go.sum | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.licenses/arduino-create-agent/go/github.com/arduino/pluggable-discovery-protocol-handler/v2.dep.yml b/.licenses/arduino-create-agent/go/github.com/arduino/pluggable-discovery-protocol-handler/v2.dep.yml index 2fdbca217..0825582ba 100644 --- a/.licenses/arduino-create-agent/go/github.com/arduino/pluggable-discovery-protocol-handler/v2.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/arduino/pluggable-discovery-protocol-handler/v2.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/arduino/pluggable-discovery-protocol-handler/v2 -version: v2.2.0 +version: v2.2.1 type: go summary: Package discovery is a library for handling the Arduino Pluggable-Discovery protocol (https://github.com/arduino/tooling-rfcs/blob/main/RFCs/0002-pluggable-discovery.md#pluggable-discovery-api-via-stdinstdout) diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml index c55d351d0..3c29440df 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml @@ -1,6 +1,6 @@ --- name: go.bug.st/serial -version: v1.6.1 +version: v1.6.3 type: go summary: Package serial is a cross-platform serial library for the go language. homepage: https://pkg.go.dev/go.bug.st/serial @@ -9,7 +9,7 @@ licenses: - sources: LICENSE text: |2+ - Copyright (c) 2014-2023, Cristian Maglie. + Copyright (c) 2014-2024, Cristian Maglie. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ licenses: - sources: README.md text: |- - The software is release under a [BSD 3-clause license] + This software is released under the [BSD 3-clause license]. [contributors]: https://github.com/bugst/go-serial/graphs/contributors [BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml index 7743f09d9..4b562e2a1 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml @@ -1,16 +1,16 @@ --- name: go.bug.st/serial/enumerator -version: v1.6.1 +version: v1.6.3 type: go summary: Package enumerator is a golang cross-platform library for USB serial port discovery. homepage: https://pkg.go.dev/go.bug.st/serial/enumerator license: bsd-3-clause licenses: -- sources: serial@v1.6.1/LICENSE +- sources: serial@v1.6.3/LICENSE text: |2+ - Copyright (c) 2014-2023, Cristian Maglie. + Copyright (c) 2014-2024, Cristian Maglie. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -42,9 +42,9 @@ licenses: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: serial@v1.6.1/README.md +- sources: serial@v1.6.3/README.md text: |- - The software is release under a [BSD 3-clause license] + This software is released under the [BSD 3-clause license]. [contributors]: https://github.com/bugst/go-serial/graphs/contributors [BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml index d81d7857c..0e2d5f7da 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml @@ -1,15 +1,15 @@ --- name: go.bug.st/serial/unixutils -version: v1.6.1 +version: v1.6.3 type: go -summary: +summary: homepage: https://pkg.go.dev/go.bug.st/serial/unixutils license: bsd-3-clause licenses: -- sources: serial@v1.6.1/LICENSE +- sources: serial@v1.6.3/LICENSE text: |2+ - Copyright (c) 2014-2023, Cristian Maglie. + Copyright (c) 2014-2024, Cristian Maglie. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41,9 +41,9 @@ licenses: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: serial@v1.6.1/README.md +- sources: serial@v1.6.3/README.md text: |- - The software is release under a [BSD 3-clause license] + This software is released under the [BSD 3-clause license]. [contributors]: https://github.com/bugst/go-serial/graphs/contributors [BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE diff --git a/go.mod b/go.mod index 82ee10173..19d0eae02 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/ProtonMail/go-crypto v1.1.0-alpha.5-proton github.com/arduino/go-paths-helper v1.12.1 github.com/arduino/go-serial-utils v0.1.2 - github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 + github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.1 github.com/blang/semver v3.5.1+incompatible github.com/codeclysm/extract/v4 v4.0.0 github.com/gin-contrib/cors v1.7.2 @@ -21,7 +21,7 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/stretchr/testify v1.9.0 github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 - go.bug.st/serial v1.6.1 + go.bug.st/serial v1.6.3 goa.design/goa/v3 v3.16.1 golang.org/x/sys v0.23.0 gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa diff --git a/go.sum b/go.sum index bee2988ac..a46d0bad6 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/arduino/go-properties-orderedmap v1.8.0 h1:wEfa6hHdpezrVOh787OmClsf/K github.com/arduino/go-properties-orderedmap v1.8.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk= github.com/arduino/go-serial-utils v0.1.2 h1:MRFwME4w/uaVkJ1R+wzz4KSbI9cF9IDVrYorazvjpTk= github.com/arduino/go-serial-utils v0.1.2/go.mod h1:kzIsNPgz8DFAd1sAFKve4ubxrdGcwQ4XzvRLlztsgnE= -github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0 h1:v7og6LpskewFabmaShKVzWXl5MXbmsxaRP3yo4dJta8= -github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.0/go.mod h1:1dgblsmK2iBx3L5iNTyRIokeaxbTLUrYiUbHBK6yC3Y= +github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.1 h1:Fw8zKj1b/FkcQrWgN7aBw3ubSxpKIUtdANLXvd1Qdzw= +github.com/arduino/pluggable-discovery-protocol-handler/v2 v2.2.1/go.mod h1:1dgblsmK2iBx3L5iNTyRIokeaxbTLUrYiUbHBK6yC3Y= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= @@ -159,8 +159,8 @@ github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6GjdjIyeqR7+EVhAF9CBQmkmW7Zw0w= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -go.bug.st/serial v1.6.1 h1:VSSWmUxlj1T/YlRo2J104Zv3wJFrjHIl/T3NeruWAHY= -go.bug.st/serial v1.6.1/go.mod h1:UABfsluHAiaNI+La2iESysd9Vetq7VRdpxvjx7CmmOE= +go.bug.st/serial v1.6.3 h1:S3OG1bH+IDyokVndKrzwxI9ywiGBd8sWOn08dzSqEQI= +go.bug.st/serial v1.6.3/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI= goa.design/goa/v3 v3.16.1 h1:yZwbKrfMpE8+sz0uf+n+BtArVOFQ0kNSC0twQKwQb04= goa.design/goa/v3 v3.16.1/go.mod h1:Yd42LR0PYDbHSbsbF3vNd4YY/O+LG20Jb7+IyNdkQic= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= From 5063c6c5fa0afa2f553b11f582f3f9b2921aa766 Mon Sep 17 00:00:00 2001 From: Davide Date: Wed, 26 Mar 2025 14:30:46 +0100 Subject: [PATCH 46/51] fix(release.yml) install go step for gon (#1025) --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b2a210d9..6275922c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -259,6 +259,11 @@ jobs: environment: production steps: + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Download artifact uses: actions/download-artifact@v4 with: From 901728dadac8e48dc8acdc8692ee70d9d13ddb65 Mon Sep 17 00:00:00 2001 From: Davide Date: Thu, 27 Mar 2025 09:54:39 +0100 Subject: [PATCH 47/51] fix: allow to specify custom `signatureKey` in the `config.ini` (#1024) * make the signaturePubKey overwritable * Add debug logging for signature key parsing and handle newline escape sequences * Add MustParseRsaPublicKey function for parsing PEM formatted public keys * Remove debug print statement for signature key and fix comment typo in key parsing logic * Add error logging for command verification and update comment for public key usage * refactor(main.go) remove unnecessary print statement in parseIni function * refactor(utilities): improve formatting in ParseRsaPublicKey function * style(tools): align field declarations for improved readability --------- Co-authored-by: Luca Rinaldi --- conn.go | 158 +++++++++++++++++++++-------------------- globals/globals.go | 13 +++- main.go | 16 +++-- main_test.go | 10 +-- tools/download_test.go | 6 +- tools/tools.go | 5 +- utilities/utilities.go | 45 ++++++++---- v2/http.go | 5 +- v2/pkgs/tools.go | 27 +++---- v2/pkgs/tools_test.go | 10 +-- 10 files changed, 172 insertions(+), 123 deletions(-) diff --git a/conn.go b/conn.go index b6e03268c..8c71c54c4 100644 --- a/conn.go +++ b/conn.go @@ -19,6 +19,7 @@ package main import ( "bytes" + "crypto/rsa" "encoding/json" "errors" "fmt" @@ -79,111 +80,114 @@ type Upload struct { var uploadStatusStr = "ProgrammerStatus" -func uploadHandler(c *gin.Context) { - data := new(Upload) - if err := c.BindJSON(data); err != nil { - c.String(http.StatusBadRequest, fmt.Sprintf("err with the payload. %v", err.Error())) - return - } - - log.Printf("%+v %+v %+v %+v %+v %+v", data.Port, data.Board, data.Rewrite, data.Commandline, data.Extra, data.Filename) - - if data.Port == "" { - c.String(http.StatusBadRequest, "port is required") - return - } - - if data.Board == "" { - c.String(http.StatusBadRequest, "board is required") - log.Error("board is required") - return - } - - if !data.Extra.Network { - if data.Signature == "" { - c.String(http.StatusBadRequest, "signature is required") +func uploadHandler(pubKey *rsa.PublicKey) func(*gin.Context) { + return func(c *gin.Context) { + data := new(Upload) + if err := c.BindJSON(data); err != nil { + c.String(http.StatusBadRequest, fmt.Sprintf("err with the payload. %v", err.Error())) return } - if data.Commandline == "" { - c.String(http.StatusBadRequest, "commandline is required for local board") + log.Printf("%+v %+v %+v %+v %+v %+v", data.Port, data.Board, data.Rewrite, data.Commandline, data.Extra, data.Filename) + + if data.Port == "" { + c.String(http.StatusBadRequest, "port is required") return } - err := utilities.VerifyInput(data.Commandline, data.Signature) - - if err != nil { - c.String(http.StatusBadRequest, "signature is invalid") + if data.Board == "" { + c.String(http.StatusBadRequest, "board is required") + log.Error("board is required") return } - } - buffer := bytes.NewBuffer(data.Hex) + if !data.Extra.Network { + if data.Signature == "" { + c.String(http.StatusBadRequest, "signature is required") + return + } - filePath, err := utilities.SaveFileonTempDir(data.Filename, buffer) - if err != nil { - c.String(http.StatusBadRequest, err.Error()) - return - } + if data.Commandline == "" { + c.String(http.StatusBadRequest, "commandline is required for local board") + return + } - tmpdir, err := os.MkdirTemp("", "extrafiles") - if err != nil { - c.String(http.StatusBadRequest, err.Error()) - return - } + err := utilities.VerifyInput(data.Commandline, data.Signature, pubKey) - for _, extraFile := range data.ExtraFiles { - path, err := utilities.SafeJoin(tmpdir, extraFile.Filename) - if err != nil { - c.String(http.StatusBadRequest, err.Error()) - return + if err != nil { + log.WithField("err", err).Error("Error verifying the command") + c.String(http.StatusBadRequest, "signature is invalid") + return + } } - log.Printf("Saving %s on %s", extraFile.Filename, path) - err = os.MkdirAll(filepath.Dir(path), 0744) - if err != nil { - c.String(http.StatusBadRequest, err.Error()) - return - } + buffer := bytes.NewBuffer(data.Hex) - err = os.WriteFile(path, extraFile.Hex, 0644) + filePath, err := utilities.SaveFileonTempDir(data.Filename, buffer) if err != nil { c.String(http.StatusBadRequest, err.Error()) return } - } - if data.Rewrite != "" { - data.Board = data.Rewrite - } - - go func() { - // Resolve commandline - commandline, err := upload.PartiallyResolve(data.Board, filePath, tmpdir, data.Commandline, data.Extra, Tools) + tmpdir, err := os.MkdirTemp("", "extrafiles") if err != nil { - send(map[string]string{uploadStatusStr: "Error", "Msg": err.Error()}) + c.String(http.StatusBadRequest, err.Error()) return } - l := PLogger{Verbose: true} - - // Upload - if data.Extra.Network { - err = errors.New("network upload is not supported anymore, pease use OTA instead") - } else { - send(map[string]string{uploadStatusStr: "Starting", "Cmd": "Serial"}) - err = upload.Serial(data.Port, commandline, data.Extra, l) + for _, extraFile := range data.ExtraFiles { + path, err := utilities.SafeJoin(tmpdir, extraFile.Filename) + if err != nil { + c.String(http.StatusBadRequest, err.Error()) + return + } + log.Printf("Saving %s on %s", extraFile.Filename, path) + + err = os.MkdirAll(filepath.Dir(path), 0744) + if err != nil { + c.String(http.StatusBadRequest, err.Error()) + return + } + + err = os.WriteFile(path, extraFile.Hex, 0644) + if err != nil { + c.String(http.StatusBadRequest, err.Error()) + return + } } - // Handle result - if err != nil { - send(map[string]string{uploadStatusStr: "Error", "Msg": err.Error()}) - return + if data.Rewrite != "" { + data.Board = data.Rewrite } - send(map[string]string{uploadStatusStr: "Done", "Flash": "Ok"}) - }() - c.String(http.StatusAccepted, "") + go func() { + // Resolve commandline + commandline, err := upload.PartiallyResolve(data.Board, filePath, tmpdir, data.Commandline, data.Extra, Tools) + if err != nil { + send(map[string]string{uploadStatusStr: "Error", "Msg": err.Error()}) + return + } + + l := PLogger{Verbose: true} + + // Upload + if data.Extra.Network { + err = errors.New("network upload is not supported anymore, pease use OTA instead") + } else { + send(map[string]string{uploadStatusStr: "Starting", "Cmd": "Serial"}) + err = upload.Serial(data.Port, commandline, data.Extra, l) + } + + // Handle result + if err != nil { + send(map[string]string{uploadStatusStr: "Error", "Msg": err.Error()}) + return + } + send(map[string]string{uploadStatusStr: "Done", "Flash": "Ok"}) + }() + + c.String(http.StatusAccepted, "") + } } // PLogger sends the info from the upload to the websocket diff --git a/globals/globals.go b/globals/globals.go index d7cb09a17..ac4c14666 100644 --- a/globals/globals.go +++ b/globals/globals.go @@ -15,8 +15,15 @@ package globals -// DefaultIndexURL is the default index url var ( - // SignatureKey is the public key used to verify commands and url sent by the builder - SignatureKey = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvc0yZr1yUSen7qmE3cxF\nIE12rCksDnqR+Hp7o0nGi9123eCSFcJ7CkIRC8F+8JMhgI3zNqn4cUEn47I3RKD1\nZChPUCMiJCvbLbloxfdJrUi7gcSgUXrlKQStOKF5Iz7xv1M4XOP3JtjXLGo3EnJ1\npFgdWTOyoSrA8/w1rck4c/ISXZSinVAggPxmLwVEAAln6Itj6giIZHKvA2fL2o8z\nCeK057Lu8X6u2CG8tRWSQzVoKIQw/PKK6CNXCAy8vo4EkXudRutnEYHEJlPkVgPn\n2qP06GI+I+9zKE37iqj0k1/wFaCVXHXIvn06YrmjQw6I0dDj/60Wvi500FuRVpn9\ntwIDAQAB\n-----END PUBLIC KEY-----" + // ArduinoSignaturePubKey is the public key used to verify commands and url sent by the builder + ArduinoSignaturePubKey = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvc0yZr1yUSen7qmE3cxF +IE12rCksDnqR+Hp7o0nGi9123eCSFcJ7CkIRC8F+8JMhgI3zNqn4cUEn47I3RKD1 +ZChPUCMiJCvbLbloxfdJrUi7gcSgUXrlKQStOKF5Iz7xv1M4XOP3JtjXLGo3EnJ1 +pFgdWTOyoSrA8/w1rck4c/ISXZSinVAggPxmLwVEAAln6Itj6giIZHKvA2fL2o8z +CeK057Lu8X6u2CG8tRWSQzVoKIQw/PKK6CNXCAy8vo4EkXudRutnEYHEJlPkVgPn +2qP06GI+I+9zKE37iqj0k1/wFaCVXHXIvn06YrmjQw6I0dDj/60Wvi500FuRVpn9 +twIDAQAB +-----END PUBLIC KEY-----` ) diff --git a/main.go b/main.go index 1ca857b02..41f824b1b 100755 --- a/main.go +++ b/main.go @@ -81,7 +81,7 @@ var ( logDump = iniConf.String("log", "off", "off = (default)") origins = iniConf.String("origins", "", "Allowed origin list for CORS") portsFilterRegexp = iniConf.String("regex", "usb|acm|com", "Regular expression to filter serial port list") - signatureKey = iniConf.String("signatureKey", globals.SignatureKey, "Pem-encoded public key to verify signed commandlines") + signatureKey = iniConf.String("signatureKey", globals.ArduinoSignaturePubKey, "Pem-encoded public key to verify signed commandlines") updateURL = iniConf.String("updateUrl", "", "") verbose = iniConf.Bool("v", true, "show debug logging") crashreport = iniConf.Bool("crashreport", false, "enable crashreport logging") @@ -278,9 +278,17 @@ func loop() { } } + if signatureKey == nil || len(*signatureKey) == 0 { + log.Panicf("signature public key should be set") + } + signaturePubKey, err := utilities.ParseRsaPublicKey([]byte(*signatureKey)) + if err != nil { + log.Panicf("cannot parse signature key '%s'. %s", *signatureKey, err) + } + // Instantiate Index and Tools Index = index.Init(*indexURL, config.GetDataDir()) - Tools = tools.New(config.GetDataDir(), Index, logger) + Tools = tools.New(config.GetDataDir(), Index, logger, signaturePubKey) // see if we are supposed to wait 5 seconds if *isLaunchSelf { @@ -454,7 +462,7 @@ func loop() { r.LoadHTMLFiles("templates/nofirefox.html") r.GET("/", homeHandler) - r.POST("/upload", uploadHandler) + r.POST("/upload", uploadHandler(signaturePubKey)) r.GET("/socket.io/", socketHandler) r.POST("/socket.io/", socketHandler) r.Handle("WS", "/socket.io/", socketHandler) @@ -464,7 +472,7 @@ func loop() { r.POST("/update", updateHandler) // Mount goa handlers - goa := v2.Server(config.GetDataDir().String(), Index) + goa := v2.Server(config.GetDataDir().String(), Index, signaturePubKey) r.Any("/v2/*path", gin.WrapH(goa)) go func() { diff --git a/main_test.go b/main_test.go index d6f23fcec..1387fd221 100644 --- a/main_test.go +++ b/main_test.go @@ -30,8 +30,10 @@ import ( "github.com/arduino/arduino-create-agent/config" "github.com/arduino/arduino-create-agent/gen/tools" + "github.com/arduino/arduino-create-agent/globals" "github.com/arduino/arduino-create-agent/index" "github.com/arduino/arduino-create-agent/upload" + "github.com/arduino/arduino-create-agent/utilities" v2 "github.com/arduino/arduino-create-agent/v2" "github.com/gin-gonic/gin" "github.com/stretchr/testify/require" @@ -54,7 +56,7 @@ func TestValidSignatureKey(t *testing.T) { func TestUploadHandlerAgainstEvilFileNames(t *testing.T) { r := gin.New() - r.POST("/", uploadHandler) + r.POST("/", uploadHandler(utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey)))) ts := httptest.NewServer(r) uploadEvilFileName := Upload{ @@ -90,7 +92,7 @@ func TestUploadHandlerAgainstEvilFileNames(t *testing.T) { func TestUploadHandlerAgainstBase64WithoutPaddingMustFail(t *testing.T) { r := gin.New() - r.POST("/", uploadHandler) + r.POST("/", uploadHandler(utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey)))) ts := httptest.NewServer(r) defer ts.Close() @@ -119,7 +121,7 @@ func TestInstallToolV2(t *testing.T) { Index := index.Init(indexURL, config.GetDataDir()) r := gin.New() - goa := v2.Server(config.GetDataDir().String(), Index) + goa := v2.Server(config.GetDataDir().String(), Index, utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) r.Any("/v2/*path", gin.WrapH(goa)) ts := httptest.NewServer(r) @@ -213,7 +215,7 @@ func TestInstalledHead(t *testing.T) { Index := index.Init(indexURL, config.GetDataDir()) r := gin.New() - goa := v2.Server(config.GetDataDir().String(), Index) + goa := v2.Server(config.GetDataDir().String(), Index, utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) r.Any("/v2/*path", gin.WrapH(goa)) ts := httptest.NewServer(r) diff --git a/tools/download_test.go b/tools/download_test.go index 7cf2fab0d..96a105fd7 100644 --- a/tools/download_test.go +++ b/tools/download_test.go @@ -21,7 +21,9 @@ import ( "testing" "time" + "github.com/arduino/arduino-create-agent/globals" "github.com/arduino/arduino-create-agent/index" + "github.com/arduino/arduino-create-agent/utilities" "github.com/arduino/arduino-create-agent/v2/pkgs" "github.com/arduino/go-paths-helper" "github.com/stretchr/testify/require" @@ -128,7 +130,7 @@ func TestDownload(t *testing.T) { IndexFile: *paths.New("testdata", "test_tool_index.json"), LastRefresh: time.Now(), } - testTools := New(tempDirPath, &testIndex, func(msg string) { t.Log(msg) }) + testTools := New(tempDirPath, &testIndex, func(msg string) { t.Log(msg) }, utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) for _, tc := range testCases { t.Run(tc.name+"-"+tc.version, func(t *testing.T) { @@ -175,7 +177,7 @@ func TestCorruptedInstalled(t *testing.T) { defer fileJSON.Close() _, err = fileJSON.Write([]byte("Hello")) require.NoError(t, err) - testTools := New(tempDirPath, &testIndex, func(msg string) { t.Log(msg) }) + testTools := New(tempDirPath, &testIndex, func(msg string) { t.Log(msg) }, utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) // Download the tool err = testTools.Download("arduino-test", "avrdude", "6.3.0-arduino17", "keep") require.NoError(t, err) diff --git a/tools/tools.go b/tools/tools.go index 5cecc5089..f371126b5 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -16,6 +16,7 @@ package tools import ( + "crypto/rsa" "encoding/json" "path/filepath" "strings" @@ -55,14 +56,14 @@ type Tools struct { // The New functions accept the directory to use to host the tools, // an index (used to download the tools), // and a logger to log the operations -func New(directory *paths.Path, index *index.Resource, logger func(msg string)) *Tools { +func New(directory *paths.Path, index *index.Resource, logger func(msg string), signPubKey *rsa.PublicKey) *Tools { t := &Tools{ directory: directory, index: index, logger: logger, installed: map[string]string{}, mutex: sync.RWMutex{}, - tools: pkgs.New(index, directory.String(), "replace"), + tools: pkgs.New(index, directory.String(), "replace", signPubKey), } _ = t.readMap() return t diff --git a/utilities/utilities.go b/utilities/utilities.go index 5979732d4..662672da7 100644 --- a/utilities/utilities.go +++ b/utilities/utilities.go @@ -30,8 +30,6 @@ import ( "os/exec" "path/filepath" "strings" - - "github.com/arduino/arduino-create-agent/globals" ) // SaveFileonTempDir creates a temp directory and saves the file data as the @@ -131,23 +129,44 @@ func SafeJoin(parent, subdir string) (string, error) { return res, nil } -// VerifyInput will verify an input against a signature +// VerifyInput will verify an input against a signature using the public key. // A valid signature is indicated by returning a nil error. -func VerifyInput(input string, signature string) error { +func VerifyInput(input string, signature string, pubKey *rsa.PublicKey) error { sign, _ := hex.DecodeString(signature) - block, _ := pem.Decode([]byte(globals.SignatureKey)) + h := sha256.New() + h.Write([]byte(input)) + d := h.Sum(nil) + return rsa.VerifyPKCS1v15(pubKey, crypto.SHA256, d, sign) +} + +// ParseRsaPublicKey parses a public key in PEM format and returns the rsa.PublicKey object. +// Returns an error if the key is invalid. +func ParseRsaPublicKey(key []byte) (*rsa.PublicKey, error) { + block, _ := pem.Decode(key) if block == nil { - return errors.New("invalid key") + return nil, errors.New("invalid key") } - key, err := x509.ParsePKIXPublicKey(block.Bytes) + + parsedKey, err := x509.ParsePKIXPublicKey(block.Bytes) if err != nil { - return err + return nil, err } - rsaKey := key.(*rsa.PublicKey) - h := sha256.New() - h.Write([]byte(input)) - d := h.Sum(nil) - return rsa.VerifyPKCS1v15(rsaKey, crypto.SHA256, d, sign) + + publicKey, ok := parsedKey.(*rsa.PublicKey) + if !ok { + return nil, fmt.Errorf("not an rsa key") + } + return publicKey, nil +} + +// MustParseRsaPublicKey parses a public key in PEM format and returns the rsa.PublicKey object. +// Panics if the key is invalid. +func MustParseRsaPublicKey(key []byte) *rsa.PublicKey { + parsedKey, err := ParseRsaPublicKey(key) + if err != nil { + panic(err) + } + return parsedKey } // UserPrompt executes an osascript and returns the pressed button diff --git a/v2/http.go b/v2/http.go index 390ec3989..2b47b93a8 100644 --- a/v2/http.go +++ b/v2/http.go @@ -17,6 +17,7 @@ package v2 import ( "context" + "crypto/rsa" "encoding/json" "net/http" @@ -31,7 +32,7 @@ import ( ) // Server is the actual server -func Server(directory string, index *index.Resource) http.Handler { +func Server(directory string, index *index.Resource, pubKey *rsa.PublicKey) http.Handler { mux := goahttp.NewMuxer() // Instantiate logger @@ -40,7 +41,7 @@ func Server(directory string, index *index.Resource) http.Handler { logAdapter := LogAdapter{Logger: logger} // Mount tools - toolsSvc := pkgs.New(index, directory, "replace") + toolsSvc := pkgs.New(index, directory, "replace", pubKey) toolsEndpoints := toolssvc.NewEndpoints(toolsSvc) toolsServer := toolssvr.New(toolsEndpoints, mux, CustomRequestDecoder, goahttp.ResponseEncoder, errorHandler(logger), nil) toolssvr.Mount(mux, toolsServer) diff --git a/v2/pkgs/tools.go b/v2/pkgs/tools.go index f09dc3f0a..7f34e3d08 100644 --- a/v2/pkgs/tools.go +++ b/v2/pkgs/tools.go @@ -18,6 +18,7 @@ package pkgs import ( "bytes" "context" + "crypto/rsa" "crypto/sha256" "encoding/hex" "encoding/json" @@ -58,23 +59,25 @@ var ( // // It requires an Index Resource to search for tools type Tools struct { - index *index.Resource - folder string - behaviour string - installed map[string]string - mutex sync.RWMutex + index *index.Resource + folder string + behaviour string + installed map[string]string + mutex sync.RWMutex + verifySignaturePubKey *rsa.PublicKey // public key used to verify the signature of a command sent to the boards } // New will return a Tool object, allowing the caller to execute operations on it. // The New function will accept an index as parameter (used to download the indexes) // and a folder used to download the indexes -func New(index *index.Resource, folder, behaviour string) *Tools { +func New(index *index.Resource, folder, behaviour string, verifySignaturePubKey *rsa.PublicKey) *Tools { t := &Tools{ - index: index, - folder: folder, - behaviour: behaviour, - installed: map[string]string{}, - mutex: sync.RWMutex{}, + index: index, + folder: folder, + behaviour: behaviour, + installed: map[string]string{}, + mutex: sync.RWMutex{}, + verifySignaturePubKey: verifySignaturePubKey, } t.readInstalled() return t @@ -166,7 +169,7 @@ func (t *Tools) Install(ctx context.Context, payload *tools.ToolPayload) (*tools //if URL is defined and is signed we verify the signature and override the name, payload, version parameters if payload.URL != nil && payload.Signature != nil && payload.Checksum != nil { - err := utilities.VerifyInput(*payload.URL, *payload.Signature) + err := utilities.VerifyInput(*payload.URL, *payload.Signature, t.verifySignaturePubKey) if err != nil { return nil, err } diff --git a/v2/pkgs/tools_test.go b/v2/pkgs/tools_test.go index edd575fc8..7bf0ff0e3 100644 --- a/v2/pkgs/tools_test.go +++ b/v2/pkgs/tools_test.go @@ -25,7 +25,9 @@ import ( "github.com/arduino/arduino-create-agent/config" "github.com/arduino/arduino-create-agent/gen/tools" + "github.com/arduino/arduino-create-agent/globals" "github.com/arduino/arduino-create-agent/index" + "github.com/arduino/arduino-create-agent/utilities" "github.com/arduino/arduino-create-agent/v2/pkgs" "github.com/arduino/go-paths-helper" "github.com/stretchr/testify/require" @@ -45,7 +47,7 @@ func TestTools(t *testing.T) { // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) - service := pkgs.New(Index, tmp, "replace") + service := pkgs.New(Index, tmp, "replace", utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) ctx := context.Background() @@ -126,7 +128,7 @@ func TestEvilFilename(t *testing.T) { // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) - service := pkgs.New(Index, tmp, "replace") + service := pkgs.New(Index, tmp, "replace", utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) ctx := context.Background() @@ -195,7 +197,7 @@ func TestInstalledHead(t *testing.T) { // Instantiate Index Index := index.Init(indexURL, config.GetDataDir()) - service := pkgs.New(Index, tmp, "replace") + service := pkgs.New(Index, tmp, "replace", utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) ctx := context.Background() @@ -216,7 +218,7 @@ func TestInstall(t *testing.T) { LastRefresh: time.Now(), } - tool := pkgs.New(testIndex, tmp, "replace") + tool := pkgs.New(testIndex, tmp, "replace", utilities.MustParseRsaPublicKey([]byte(globals.ArduinoSignaturePubKey))) ctx := context.Background() From 87f097b862ae2e98179fd216a132712493777543 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 28 Mar 2025 16:41:53 +0100 Subject: [PATCH 48/51] fix: update go.bug.st/serial to v1.6.4 to fix windows issue (#1027) * fix: update go.bug.st/serial to v1.6.4 * Updated license cache --------- Co-authored-by: Cristian Maglie --- .licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml | 2 +- .../go/go.bug.st/serial/enumerator.dep.yml | 6 +++--- .../go/go.bug.st/serial/unixutils.dep.yml | 6 +++--- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml index 3c29440df..73d434109 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial.dep.yml @@ -1,6 +1,6 @@ --- name: go.bug.st/serial -version: v1.6.3 +version: v1.6.4 type: go summary: Package serial is a cross-platform serial library for the go language. homepage: https://pkg.go.dev/go.bug.st/serial diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml index 4b562e2a1..d7b0b63e1 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial/enumerator.dep.yml @@ -1,13 +1,13 @@ --- name: go.bug.st/serial/enumerator -version: v1.6.3 +version: v1.6.4 type: go summary: Package enumerator is a golang cross-platform library for USB serial port discovery. homepage: https://pkg.go.dev/go.bug.st/serial/enumerator license: bsd-3-clause licenses: -- sources: serial@v1.6.3/LICENSE +- sources: serial@v1.6.4/LICENSE text: |2+ Copyright (c) 2014-2024, Cristian Maglie. @@ -42,7 +42,7 @@ licenses: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: serial@v1.6.3/README.md +- sources: serial@v1.6.4/README.md text: |- This software is released under the [BSD 3-clause license]. diff --git a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml index 0e2d5f7da..ac5bb6bb1 100644 --- a/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml +++ b/.licenses/arduino-create-agent/go/go.bug.st/serial/unixutils.dep.yml @@ -1,12 +1,12 @@ --- name: go.bug.st/serial/unixutils -version: v1.6.3 +version: v1.6.4 type: go summary: homepage: https://pkg.go.dev/go.bug.st/serial/unixutils license: bsd-3-clause licenses: -- sources: serial@v1.6.3/LICENSE +- sources: serial@v1.6.4/LICENSE text: |2+ Copyright (c) 2014-2024, Cristian Maglie. @@ -41,7 +41,7 @@ licenses: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: serial@v1.6.3/README.md +- sources: serial@v1.6.4/README.md text: |- This software is released under the [BSD 3-clause license]. diff --git a/go.mod b/go.mod index 19d0eae02..3bffc09ed 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/stretchr/testify v1.9.0 github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 - go.bug.st/serial v1.6.3 + go.bug.st/serial v1.6.4 goa.design/goa/v3 v3.16.1 golang.org/x/sys v0.23.0 gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa diff --git a/go.sum b/go.sum index a46d0bad6..676649d56 100644 --- a/go.sum +++ b/go.sum @@ -159,8 +159,8 @@ github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6GjdjIyeqR7+EVhAF9CBQmkmW7Zw0w= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -go.bug.st/serial v1.6.3 h1:S3OG1bH+IDyokVndKrzwxI9ywiGBd8sWOn08dzSqEQI= -go.bug.st/serial v1.6.3/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI= +go.bug.st/serial v1.6.4 h1:7FmqNPgVp3pu2Jz5PoPtbZ9jJO5gnEnZIvnI1lzve8A= +go.bug.st/serial v1.6.4/go.mod h1:nofMJxTeNVny/m6+KaafC6vJGj3miwQZ6vW4BZUGJPI= goa.design/goa/v3 v3.16.1 h1:yZwbKrfMpE8+sz0uf+n+BtArVOFQ0kNSC0twQKwQb04= goa.design/goa/v3 v3.16.1/go.mod h1:Yd42LR0PYDbHSbsbF3vNd4YY/O+LG20Jb7+IyNdkQic= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= From b7174301c1983cf2593643b5789e01d3d50d1089 Mon Sep 17 00:00:00 2001 From: Davide Date: Tue, 1 Apr 2025 15:42:28 +0200 Subject: [PATCH 49/51] fix: update workflow to use ubuntu-22.04 instead of ubuntu-20.04 (#1028) --- .github/workflows/publish-go-tester-task.yml | 2 +- .github/workflows/release.yml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 8e72c351a..89d5c2b45 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -65,7 +65,7 @@ jobs: #use the strategy instead because we still use the native build strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-13] + os: [ubuntu-22.04, windows-2019, macos-13] arch: [-amd64] include: - os: windows-2019 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6275922c3..12b3781ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: prerelease: ${{ steps.prerelease.outputs.IS_PRE }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-13] + os: [ubuntu-22.04, windows-2019, macos-13] arch: [amd64] include: - os: windows-2019 @@ -88,7 +88,7 @@ jobs: - name: Build the Agent for linux run: task go:build - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' # the manifest is required by windows GUI apps, otherwise the binary will crash with: "Unable to create main window: TTM_ADDTOOL failed" (for reference https://github.com/lxn/walk/issues/28) # rsrc will produce a *.syso file that should get automatically recognized by go build command and linked into an executable. @@ -390,7 +390,7 @@ jobs: # This job is responsible for generating the installers (using installbuilder) package: needs: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: # vars used by installbuilder @@ -400,10 +400,10 @@ jobs: strategy: fail-fast: false # if one os is failing continue nonetheless matrix: # used to generate installers for different OS and not for runs-on - os: [ubuntu-20.04, windows-2019] + os: [ubuntu-22.04, windows-2019] arch: [amd64] include: - - os: ubuntu-20.04 + - os: ubuntu-22.04 platform-name: linux installbuilder-name: linux-x64 installer-extension: .run @@ -438,7 +438,7 @@ jobs: # zip artifacts do not mantain executable permission - name: Make executable run: chmod -v +x artifacts/${{ matrix.platform-name }}/${{ env.PROJECT_NAME }}* - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' - name: Rename executable to Arduino_Cloud_Agent run: mv -v artifacts/${{ matrix.platform-name }}/${{ env.PROJECT_NAME }}${{ matrix.extension }} artifacts/${{ matrix.platform-name }}/Arduino_Cloud_Agent${{ matrix.extension }} @@ -451,7 +451,7 @@ jobs: - name: Generate archive run: tar -czvf ArduinoCloudAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer.tar.gz ArduinoCloudAgent-${GITHUB_REF##*/}-${{ matrix.platform-name }}-${{ matrix.arch }}-installer${{matrix.installer-extension}} - if: matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-22.04' - name: Upload artifacts uses: actions/upload-artifact@v4 @@ -606,7 +606,7 @@ jobs: if-no-files-found: error create-release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 environment: production needs: [build, generate-sign-dmg, sign-windows] From e7ea3763ff3d4db6a84c207afd562790a38dc3b5 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 24 Apr 2025 16:45:22 +0200 Subject: [PATCH 50/51] fix: Serial Monitor corrupted output in some rare cases (#1032) * Synchronize multiple open commands coming together. * Allow re-opening of already opened ports * Renamed mutex var and added comment * Error out if baudrate and buftype of already opened port do not match --- serial.go | 19 ++++++------------- serialport.go | 31 +++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/serial.go b/serial.go index 64e5b8f7f..1a43f3644 100755 --- a/serial.go +++ b/serial.go @@ -31,7 +31,7 @@ import ( type serialhub struct { // Opened serial ports. - ports map[*serport]bool + ports map[string]*serport mu sync.Mutex } @@ -60,7 +60,7 @@ type SpPortItem struct { var serialPorts SerialPortList var sh = serialhub{ - ports: make(map[*serport]bool), + ports: make(map[string]*serport), } // Register serial ports from the connections. @@ -68,7 +68,7 @@ func (sh *serialhub) Register(port *serport) { sh.mu.Lock() //log.Print("Registering a port: ", p.portConf.Name) h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Got register/open on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + ",\"BufferType\":\"" + port.BufferType + "\"}") - sh.ports[port] = true + sh.ports[port.portName] = port sh.mu.Unlock() } @@ -77,7 +77,7 @@ func (sh *serialhub) Unregister(port *serport) { sh.mu.Lock() //log.Print("Unregistering a port: ", p.portConf.Name) h.broadcastSys <- []byte("{\"Cmd\":\"Close\",\"Desc\":\"Got unregister/close on port.\",\"Port\":\"" + port.portConf.Name + "\",\"Baud\":" + strconv.Itoa(port.portConf.Baud) + "}") - delete(sh.ports, port) + delete(sh.ports, port.portName) close(port.sendBuffered) close(port.sendNoBuf) sh.mu.Unlock() @@ -86,15 +86,8 @@ func (sh *serialhub) Unregister(port *serport) { func (sh *serialhub) FindPortByName(portname string) (*serport, bool) { sh.mu.Lock() defer sh.mu.Unlock() - - for port := range sh.ports { - if strings.EqualFold(port.portConf.Name, portname) { - // we found our port - //spHandlerClose(port) - return port, true - } - } - return nil, false + port, ok := sh.ports[portname] + return port, ok } // List broadcasts a Json representation of the ports found diff --git a/serialport.go b/serialport.go index 0d386bbfc..b3418fe5d 100755 --- a/serialport.go +++ b/serialport.go @@ -20,6 +20,7 @@ import ( "encoding/base64" "io" "strconv" + "sync" "sync/atomic" "time" "unicode/utf8" @@ -273,7 +274,13 @@ func (p *serport) writerRaw() { h.broadcastSys <- []byte(msgstr) } +// This lock is used to prevent multiple threads from trying to open the same port at the same time. +// It presents issues with the serial port driver on some OS's: https://github.com/arduino/arduino-create-agent/issues/1031 +var spHandlerOpenLock sync.Mutex + func spHandlerOpen(portname string, baud int, buftype string) { + spHandlerOpenLock.Lock() + defer spHandlerOpenLock.Unlock() log.Print("Inside spHandler") @@ -295,11 +302,14 @@ func spHandlerOpen(portname string, baud int, buftype string) { sp, err := serial.Open(portname, mode) log.Print("Just tried to open port") if err != nil { - //log.Fatal(err) - log.Print("Error opening port " + err.Error()) - //h.broadcastSys <- []byte("Error opening port. " + err.Error()) - h.broadcastSys <- []byte("{\"Cmd\":\"OpenFail\",\"Desc\":\"Error opening port. " + err.Error() + "\",\"Port\":\"" + conf.Name + "\",\"Baud\":" + strconv.Itoa(conf.Baud) + "}") - + existingPort, ok := sh.FindPortByName(portname) + if ok && existingPort.portConf.Baud == baud && existingPort.BufferType == buftype { + log.Print("Port already opened") + h.broadcastSys <- []byte("{\"Cmd\":\"Open\",\"Desc\":\"Port already opened.\",\"Port\":\"" + existingPort.portConf.Name + "\",\"Baud\":" + strconv.Itoa(existingPort.portConf.Baud) + ",\"BufferType\":\"" + existingPort.BufferType + "\"}") + } else { + log.Print("Error opening port " + err.Error()) + h.broadcastSys <- []byte("{\"Cmd\":\"OpenFail\",\"Desc\":\"Error opening port. " + err.Error() + "\",\"Port\":\"" + conf.Name + "\",\"Baud\":" + strconv.Itoa(conf.Baud) + "}") + } return } log.Print("Opened port successfully") @@ -331,7 +341,6 @@ func spHandlerOpen(portname string, baud int, buftype string) { p.bufferwatcher = bw sh.Register(p) - defer sh.Unregister(p) serialPorts.MarkPortAsOpened(portname) serialPorts.List() @@ -342,10 +351,12 @@ func spHandlerOpen(portname string, baud int, buftype string) { go p.writerNoBuf() // this is thread to send to serial port but with base64 decoding go p.writerRaw() - - p.reader(buftype) - - serialPorts.List() + // this is the thread that reads from the serial port + go func() { + p.reader(buftype) + serialPorts.List() + sh.Unregister(p) + }() } func (p *serport) Close() { From b2b98877d93b0e762c50145971d45b5a97cc6d44 Mon Sep 17 00:00:00 2001 From: Davide Date: Thu, 15 May 2025 15:51:25 +0200 Subject: [PATCH 51/51] ci(Taskfile): add a command to test autoupdate (#1033) * feat: add demo task for local auto-update workflow of the Agent * fix: update autoupdate demo description and improve server wait logic * fix: remove unnecessary blank lines in Taskfile.yml * fix: clarify the importance of the 'CreateAgent/Stable' path in update file search --- Taskfile.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index bba07548e..681c8274d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -149,6 +149,20 @@ tasks: - task: go:vet - task: go:lint + autoupdate:demo: + desc: Demo the local auto-update workflow for the Agent (for linux and mac user) + prompt: Before continuing, please make sure you’ve opened the "Open Configuration" option from the Agent menu and set the updateUrl=http://127.0.0.1:3000/ + cmds: + - task: go:build + - go install github.com/sanbornm/go-selfupdate/...@latest + # NOTE: the path 'CreateAgent/Stable' is important to keep as is + # because agent searches the update files into "CreateAgent/Stable/{platform}.json" and "https://downloads.arduino.cc/CreateAgent/Stable/{version}/{platform}.gz" + - go-selfupdate -o public/CreateAgent/Stable ./arduino-cloud-agent {{.VERSION}} + - docker rm -f agent-static-server + - docker run --rm -d -v "$PWD/public:/usr/share/nginx/html:ro" -p 3000:80 --name agent-static-server nginx:alpine + - sleep 5 # wait the server is up before starting the update + - curl -X POST http://127.0.0.1:8991/update + vars: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/release-go-task/Taskfile.yml PROJECT_NAME: arduino-cloud-agent