awslabs / awslabs/ssosync

Debug log in ConvertIdentityStoreGroupToAWSGroup prints pointer addresses instead of values

Closed Beginner friendly
#335 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
666
Forks
213
Avg merge
1d 7h
Merged PRs (30d)
4

Description

**Describe the bug**

`ConvertIdentityStoreGroupToAWSGroup` (`internal/sync.go`) logs the group id and display name as `*string` pointers, so the debug line prints memory addresses instead of the values:

```go
log.WithField("groupId", group.GroupId).WithField("displayName", group.DisplayName).Debug("ConvertIdentityStoreGroupToAWSGroup() Group converted")
```

`group.GroupId` and `group.DisplayName` are `*string`, so the emitted line looks like:

```
level=debug msg="ConvertIdentityStoreGroupToAWSGroup() Group converted" displayName=0x1400010f810 groupId=0x1400010f7f0
```

**To Reproduce**
Steps to reproduce the behavior:
1. Run ssosync with `--debug` against IAM Identity Center (any sync method that lists groups).
2. Look at the `ConvertIdentityStoreGroupToAWSGroup() Group converted` debug lines.
3. `displayName` and `groupId` show pointer addresses (`0x...`) rather than the group name / id.

**Expected behavior**

The debug line shows the actual values, e.g. `displayName=engineering groupId=9067...-...`, which is what makes the debug output useful when tracing group conversion.

**Additional context**

Version: v2.6.1 (also current master). Both fields are nil-checked immediately above the log call, so dereferencing them (`*group.GroupId`, `*group.DisplayName`) is safe. I'll open a PR with the one-line fix.

Contributor guide

Open the contributing guide

Research direction

Open internal/sync.go and locate ConvertIdentityStoreGroupToAWSGroup, then inspect the nil checks immediately before the debug log. Run ssosync with --debug against IAM Identity Center and confirm the conversion log shows the group name and ID values rather than pointer addresses.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.