Conversation
Pi-hole core v5.5
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
Tweak local DNS record and CNAME
Signed-off-by: bcambl <blayne@blaynecampbell.com>
Pi-hole v5.6
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: David Irvine <aviddiviner@gmail.com>
Fix documentation; add some missing zones
Signed-off-by: Christian König <ckoenig@posteo.de>
…pi-hole#4421) * Only change the recommendation to use apt Signed-off-by: Christian König <ckoenig@posteo.de>
* Allow users to skip setting static IP adresss Signed-off-by: Christian König <ckoenig@posteo.de>
…e#3191) * add test for file permissions of $webroot Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * changes sudo to su for running command as user www-data Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * installs PIHOLE_WEB_DEPS to create LIGHTTPD_USER Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * changes stdout to rc Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * use installPihole instead of installPiholeWeb in test Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * try installation process with main Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * mock systemctl Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * removes stickler errors Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * start lighttpd and make webpage test optional Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * test all files and directories in $webroot Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * fix stickler and codefactor warnings Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * set permission for /var/cache if it did not exist before Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * add test case for pihole files Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * fix stickler errors Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * revert "set permission for /var/cache if it did not exist before" and make lighttpd start work Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * add --add-cap=NET_ADMIN to enable FTL start Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * specify DNS server for cURL Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * check files created by FTL Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * reorder code and change nameserver in /etc/resolv.conf Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * resolve with dig instead of relying on /etc/resolv.conf Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * set IP to 127.0.0.1 in setupVars.conf for blockpage tests Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * resolve domain with dig and remove debug output Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * fix stickler errors Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * no git pull in Github Action runs for pull requests Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * --cap-add=ALL test Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * fix stickler errors Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * remove debug code Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * update_repo patch for CentOS 7 in Github Actions Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * removes TODOs and stickler warnings Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * adds trailing slash to domain Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * use only first result from dig Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * domain name resolution does not work reliably in docker container Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * repair executable permission Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com> * Create mock_command_passthrough that allows intercepting of specific arguments - everything else is passed through to the proper command. Use this new command instead of making changes in basic-install.sh to make the tests pass. Signed-off-by: Adam Warner <me@adamwarner.co.uk> Co-authored-by: Adam Warner <me@adamwarner.co.uk>
* unpin the requirements and update all to latest available - needs more work still. see notes in `def host()` Signed-off-by: Adam Warner <me@adamwarner.co.uk> * fix py3 monkey patch of testinfra docker using bash Signed-off-by: Adam Hill <adam@diginc.us> * update the other test files to use `host` instead of `Pihole` Address some sticklr and codefactor update python version from 3.7 to 3.8 preload `git` onto the centos/fedora test images, and switch which with command -v in the passthrough mock testinfra is deprecated, use pytest-testinfra Signed-off-by: Adam Warner <me@adamwarner.co.uk> Co-authored-by: Adam Hill <adam@diginc.us>
Remove unused code from webpage.sh
This solves the issue reported here: pi-hole#4196 It replaces the other suggested solution here: pi-hole#4197 The benefit of using a fixed/limited list height, compared to allowing larger whiptail/dialogue dimension, is that it works on small screens as well, where the screen or console size itself is too small to hold the interface list + text above + whiptail frame. It the amount of list elements exceeds the defined list height, automatically a visual scroll bar is added and the list can be scrolled with up/down pageup/pagedown buttons, hence it is generally not required to adjust a list height based on the amount of elements. The fixed height of "6" is chosen since all other "--radiolist" calls use this fixed height as well, it fits and looks good within a 20 rows high whiptail dialogue, and in the common Pi-hole use cases there are no more than 6 network interfaces. Signed-off-by: MichaIng <micha@dietpi.com>
Use a fixed list height for network interface selection
Done with the help of beautysh (a python-based bash formatter) Signed-off-by: jbzdarkid <jbzdarkid@gmail.com>
Clean up bash script formatting
Signed-off-by: MichaIng <micha@dietpi.com>
Fix generated /etc/os-release file in OS check test
Co-authored-by: abesnier <besnier_antoine@yahoo.fr> Signed-off-by: Christian König <ckoenig@posteo.de>
* Some shellchecks in basic-install.sh Signed-off-by: ChillerDragon <ChillerDragon@gmail.com> * Use more explicit grep (thanks to @MichaIng) Signed-off-by: ChillerDragon <ChillerDragon@gmail.com>
* Fix pi-hole#4279 Signed-off-by: Subhaditya Nath <sn03.general@gmail.com> * Don't ignore exit code of version.sh If it exits with a non-zero return code, that means some error occurred, and so it shouldn't be ignored. Signed-off-by: Subhaditya Nath <sn03.general@gmail.com> * Implement changes suggested by @MichalNg Signed-off-by: Subhaditya Nath <sn03.general@gmail.com> * Implement changes suggested by @PromoFaux Signed-off-by: Subhaditya Nath <sn03.general@gmail.com> * Always source /etc/pihole/setupVars.conf pi-hole#4370 (comment) Co-authored-by: Adam Warner <me@adamwarner.co.uk>
Signed-off-by: Christian König <ckoenig@posteo.de>
Fix number of invalid domains
Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
…or it. Can be used in future to organise re/commonly-used code Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Fix stale label to stale
sync: master to development
Signed-off-by: DL6ER <dl6er@dl6er.de>
Fix updating based on tags on older git versions by doing a full fetch
Replace value for BLOCKING_ENABLED, add if it does not already exist
Signed-off-by: Lukas Schlötterer <80917404+lschloetterer@users.noreply.github.com>
…ite3 Replace calls to sqlite3 by calls to pihole-FTL sqlite3
Switch from centos8 to centos8:stream base image for centos 8 tests
Signed-off-by: Christian König <ckoenig@posteo.de> Remove double https:// Signed-off-by: Christian König <ckoenig@posteo.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
Co-authored-by: DL6ER <DL6ER@users.noreply.github.com>
Signed-off-by: Lukas Schlötterer <80917404+lschloetterer@users.noreply.github.com>
Remove pihole-FTL.conf manpage
add parameter to set filename for teleporter
…in case of manual entries with mixed case having been added Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Use case insensitive deletion when removing custom CNAME/DNS records
Pi-hole Core v5.9
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net> co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
Wrap touch calls with if/then guards for Buster docker.
| runs-on: ubuntu-latest | ||
| name: Syncing branches | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Opening pull request | ||
| id: pull | ||
| uses: tretuna/sync-branches@1.4.0 | ||
| with: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| FROM_BRANCH: 'master' | ||
| TO_BRANCH: 'development' | ||
| - name: Label the pull request to ignore for release note generation | ||
| uses: actions-ecosystem/action-add-labels@v1 | ||
| with: | ||
| labels: internal | ||
| repo: ${{ github.repository }} | ||
| number: ${{ steps.pull.outputs.PULL_REQUEST_NUMBER }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix this problem, we should explicitly declare a permissions block. The best place is at the job level (under the sync-branches job in this workflow), defining only the permissions required. Since this workflow checks out code and creates pull requests, and labels PRs, the minimal required permissions are contents: read (for checkout) and pull-requests: write (to create and modify PRs and apply labels). No other write permissions appear necessary. The permissions block should be added as the first line inside the job definition, above runs-on. No special imports, definitions, or method changes are required. Only the YAML needs to be updated.
| @@ -7,6 +7,9 @@ | ||
|
|
||
| jobs: | ||
| sync-branches: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| runs-on: ubuntu-latest | ||
| name: Syncing branches | ||
| steps: |
sync-branches: New code has just landed in master, so let's bring development up to speed!