Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ensure compliance with Ledger guidelines

# This workflow is mandatory in all applications
# It calls a reusable workflow guidelines_enforcer developed by Ledger's internal developer team.
# The successful completion of the reusable workflow is a mandatory step for an app to be available on the Ledger
# application store.
#
# More information on the guidelines can be found in the repository:
# LedgerHQ/ledger-app-workflows/

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
guidelines_enforcer:
name: Call Ledger guidelines_enforcer
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
Comment on lines +22 to +23

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 5 months ago

To fix the issue, add a permissions block to the workflow. This block should specify the least privileges required for the workflow to function correctly. Since the workflow calls a reusable workflow, it is likely that only contents: read permissions are needed to access the repository contents. If additional permissions are required (e.g., pull-requests: write), they should be added explicitly.

The permissions block can be added at the root level of the workflow to apply to all jobs or within the specific job (guidelines_enforcer) to limit permissions for that job only.


Suggested changeset 1
.github/workflows/guidelines_enforcer.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/guidelines_enforcer.yml b/.github/workflows/guidelines_enforcer.yml
--- a/.github/workflows/guidelines_enforcer.yml
+++ b/.github/workflows/guidelines_enforcer.yml
@@ -22,2 +22,4 @@
     name: Call Ledger guidelines_enforcer
+    permissions:
+      contents: read
     uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
EOF
@@ -22,2 +22,4 @@
name: Call Ledger guidelines_enforcer
permissions:
contents: read
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
Copilot is powered by AI and may make mistakes. Always verify output.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ ALL_PATH_PARAMS += $(NOS_PATH_PARAM)

ifeq ($(APP_TYPE), standalone)
ifeq ($(TARGET_NAME),TARGET_NANOX)
LIB_LOAD_FLAGS = --appFlags 0x250
APP_LOAD_FLAGS = --appFlags 0x250
LIB_LOAD_FLAGS = --appFlags 0x200
APP_LOAD_FLAGS = --appFlags 0x200
else
LIB_LOAD_FLAGS = --appFlags 0x50
APP_LOAD_FLAGS = --appFlags 0x50
LIB_LOAD_FLAGS = --appFlags 0x00
APP_LOAD_FLAGS = --appFlags 0x00
endif
DEFINES += IS_STANDALONE_APP

else ifeq ($(APP_TYPE), shared)
ifeq ($(TARGET_NAME),TARGET_NANOX)
LIB_LOAD_FLAGS = --appFlags 0xA50
APP_LOAD_FLAGS = --appFlags 0x250 --dep Nano
LIB_LOAD_FLAGS = --appFlags 0xA00
APP_LOAD_FLAGS = --appFlags 0x200 --dep Nano
else
LIB_LOAD_FLAGS = --appFlags 0x850
APP_LOAD_FLAGS = --appFlags 0x50 --dep Nano
LIB_LOAD_FLAGS = --appFlags 0x800
APP_LOAD_FLAGS = --appFlags 0x00 --dep Nano
endif
DEFINES += SHARED_LIBRARY_NAME=\"$(NANO_APP_NAME)\"
DEFINES += HAVE_COIN_NANO
Expand Down Expand Up @@ -112,7 +112,7 @@ endif

APPVERSION_M=1
APPVERSION_N=2
APPVERSION_P=6
APPVERSION_P=8
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)

MAX_ADPU_INPUT_SIZE=217
Expand Down
4 changes: 4 additions & 0 deletions ledger_app.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[app]
build_directory = "./"
sdk = "C"
devices = ["nanos", "nanox", "nanos+"]
2 changes: 1 addition & 1 deletion src/libn_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "u2f_transport.h"
#include "u2f_processing.h"

extern u2f_service_t G_io_u2f;
#endif // HAVE_IO_U2F

void libn_bagl_idle(void);
Expand Down
Loading