Greenstand / Greenstand/treetracker-android

Security: Disable cleartext traffic or add network security config

Open Beginner friendly
#1,228 0 comments 0 reactions 0 assignees View on GitHub
chore not ready for dev tech-debt triage
Dominant language
Kotlin
Stars
101
Forks
116
PR merge metrics
No merged PRs in 30d

Description

## Problem

`AndroidManifest.xml:39` has `android:usesCleartextTraffic="true"`, which allows unencrypted HTTP traffic for all network requests. This is a security risk as data can be intercepted in transit.

## Location

- `app/src/main/AndroidManifest.xml` line 39

## Suggested Fix

**Option A (Preferred):** Remove the attribute entirely (defaults to `false` on API 28+):
```xml

```

**Option B:** Create a `network_security_config.xml` that restricts cleartext to debug builds only:
```xml






```

Then reference it in the manifest:
```xml
android:networkSecurityConfig="@xml/network_security_config"
```

## Effort
Low

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in app/src/main/AndroidManifest.xml at line 39 and inspect how the current cleartext setting is used. Apply the preferred removal or the documented network security configuration, then verify the manifest and relevant build variants no longer permit unintended cleartext traffic.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, security
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.